Document:fragmentDirective 属性
Document
接口的 fragmentDirective
只读属性返回当前文档的 FragmentDirective
。
值
示例
在支持该特性的浏览器中打开一个包含一个或多个匹配的文本片段的标签页,并尝试在其开发者工具中运行以下代码:
js
document.fragmentDirective;
// 如果支持则返回空的 FragmentDirective 对象,否则返回 undefined
此功能目前主要用于特性检测。未来 FragmentDirective
对象可以包含更多信息。
规范
Specification |
---|
URL Fragment Text Directives # dom-document-fragmentdirective |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
fragmentDirective |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.