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> |
浏览器兼容性
Loading…