ProcessingInstruction: sheet 屬性

Baseline 已廣泛支援

此特性已相當成熟,可在許多裝置和瀏覽器版本上使用。自 ⁨2020 年 1 月⁩ 起,所有主流瀏覽器均已支援。

ProcessingInstruction 介面中只讀的 sheet 屬性包含與 ProcessingInstruction 相關聯的樣式表。

xml-stylesheet 處理指令用於將樣式表與 XML 檔案關聯。

相關的 Stylesheet 物件,如果沒有則為 null

示例

xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="rule.css"?>
…

處理指令的 sheet 屬性將返回描述 rule.cssStyleSheet 物件。

規範

規範
CSS 物件模型 (CSSOM)
# dom-linkstyle-sheet

瀏覽器相容性

另見

  • DOM API