web api instance property
HTMLScriptElement: fetchPriority property
The fetchPriority property of the HTMLScriptElement interface represents a hint to the browser indicating how it should prioritize fetching an external script relative to other external scripts.
It reflects the <script> element’s fetchpriority content attribute.
Value
A string. For the permitted values, see the HTML fetchpriority attribute.
Examples
<script id="el" type="module" src="/firefox/mdn-asset-missing.svg" fetchpriority="high"></script>
const el = document.getElementById("el");
console.log(el.fetchPriority); // Output: "high"
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
fetchPriorityfetchPriority- HTTP
Linkheader - Optimize resource loading with the Fetch Priority API for information about how this API affects priorities on Chrome.