HTMLStyleElement: blocking property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The read-onlyblocking property of theHTMLStyleElement returns a liveDOMTokenList object containing the operations that should be blocked on the fetching of an external resource. It reflects the<style> element'sblocking content attribute.
In this article
Value
A liveDOMTokenList object.
Although theblocking property itself is read-only in the sense that you can't replace theDOMTokenList object, you can still assign to theblocking property directly, which is equivalent to assigning to itsvalue property. You can also modify theDOMTokenList object using theadd(),remove(),replace(), andtoggle() methods.
Examples
html
<style blocking="render"> p { color: blue; }</style>js
const el = document.getElementById("el");console.log(el.blocking); // Output: DOMTokenList ["render"]Specifications
| Specification |
|---|
| HTML> # dom-style-blocking> |