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