HTMLLinkElement:blocking 属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
HTMLLinkElement
接口的 blocking
属性是一个字符串,表示在获取外部资源时应阻塞某些操作。
它反映 <link>
元素的 blocking
属性。
值
一个字符串,必须是以下列出的用空格分隔的阻塞标记列表,这些标记指示应被阻塞的操作:
render
-
屏幕上的内容渲染被阻塞。
示例
html
<link
id="el"
rel="stylesheet"
href="/example.css"
blocking="render"
crossorigin />
js
const el = document.getElementById("el");
console.log(el.blocking); // 输出:“render”
规范
Specification |
---|
HTML # dom-link-blocking |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
blocking |
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.