diff --git a/source b/source index e08cc11ae40..1ca63722011 100644 --- a/source +++ b/source @@ -63803,11 +63803,12 @@ interface HTMLScriptElement : HTMLElement {
The second core attribute is the src
attribute. It must only be specified for classic scripts and JavaScript module scripts, and denotes that instead of using the element's
- child text content as the script content, the script will be fetched from the
- specified URL. If src
is specified, it must be
- a valid non-empty URL potentially surrounded by spaces.
src
is specified, it must be a valid non-empty URL
+ potentially surrounded by spaces.
Which other attributes may be specified on a given script
element is determined by
the following table:
If el's type is "importmap
" or "speculationrules
", then queue an
- element task on the DOM manipulation task source given el to
- fire an event named error
at el, and return.
error
at el, and
+ return.
- External import maps and speculation rules are not currently supported. See WICG/import-maps issue #235 and WICG/nav-speculation issue #348 - for discussions on adding support.
+External import maps are not currently supported. See WICG/import-maps issue #235 for + discussions on adding support.
Let src be the value of el's Fetch an external module script graph given url, settings
object, options, and onComplete.
speculationrules
"Let speculationRulesText be the result of fetching speculation rules given url and + document.
Let result be the result of creating a speculation rules parse result given + speculationRulesText and document.
Run onComplete given result.
For performance reasons, user agents may start fetching the classic script or module graph @@ -108688,7 +108713,7 @@ new PaymentRequest(…); // Allowed to use are delivered as JSON documents, via either:
inline script
elements with their type
+
script
elements with their type
attribute set to "speculationrules
"; or
resources fetched from a URL specified in the `Speculation-Rules
` HTTP
@@ -110404,45 +110429,19 @@ new PaymentRequest(…); // Allowed to use
steps:
Let request be a new request whose
- URL is url, destination is "speculationrules
", and mode is
- "cors
".
Let speculationRulesText be the result of fetching speculation rules given url and + document.
Fetch request with the following processResponseConsumeBody steps given response response and null, failure, or a - byte sequence bodyBytes:
- -If bodyBytes is null or failure, then abort these steps.
If response's status is - not an ok status, then abort these steps.
If the result of extracting a MIME type
- from response's header list
- does not have an essence of
- "application/speculationrules+json
", then abort these steps.
Let bodyText be the result of UTF-8 - decoding bodyBytes.
Let ruleSet be the result of parsing a speculation rule set string given + speculationRulesText, document, and url.
Let ruleSet be the result of parsing a speculation rule set string given bodyText, - document, and response's URL. If this throws an exception, then abort these - steps.
Append ruleSet to + document's speculation rule + sets.
Append ruleSet to - document's speculation rule - sets.
Consider speculative loads for document.
Consider speculative loads for document.
To fetch speculation rules, given a URL url and
+ Document
document, run these steps.
+
+
Let request be a new request whose URL is url, client is document's relevant settings
+ object, destination is "speculationrules
", and mode is
+ "cors
".
Fetch request with the following processResponseConsumeBody steps given response response and null, failure, or a + byte sequence bodyBytes:
+ +If bodyBytes is null or failure, then return the empty string.
If response's status is not + an ok status, then return the empty string.
If the result of extracting a MIME type
+ from response's header list
+ does not have an essence of
+ "application/speculationrules+json
", then return the empty string.
Return the result of UTF-8 decoding + bodyBytes.
To create a classic script, given a