HTMLScriptElement: fetchPriority property - Web APIs | MDN
Value
A string. For the permitted values, see the HTML fetchpriority attribute.
Examples
html
<script id="el" type="module" src="main.js" fetchpriority="high"></script>
js
const el = document.getElementById("el");
console.log(el.fetchPriority); // Output: "high"
Specifications
| Specification |
|---|
| HTML # dom-script-fetchpriority |
Browser compatibility
See also
HTMLImageElement.fetchPriorityHTMLLinkElement.fetchPriority- HTTP
Linkheader - Optimize resource loading with the Fetch Priority API for information about how this API affects priorities on Chrome.