Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLScriptElement
  4. fetchPriority

HTMLScriptElement: fetchPriority property

Baseline 2024
Newly available

Since ⁨October 2024⁩, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

ThefetchPriority property of theHTMLScriptElement 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'sfetchpriority content attribute.

Value

A string. For the permitted values, see the HTMLfetchpriority attribute.

Examples

html
<script 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

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp