HTMLScriptElement: blocking property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The blocking property of the HTMLScriptElement interface is a string indicating that certain operations should be blocked on the fetching of the script.

It reflects the blocking attribute of the <script> element.

Value

A string. Must be a space-separated list of blocking tokens listed below indicating the operations that are to be blocked:

render

The rendering of content on the screen is blocked.

Examples

html
<script id="el" type="text/javascript" async blocking="render"></script>
js
const el = document.getElementById("el");
console.log(el.blocking); // Output: "render"

Specifications

Specification
HTML Standard
# dom-script-blocking

Browser compatibility

BCD tables only load in the browser

See also