From 6ae424e0c3ad62ec0dba38e2b640889285d266fe Mon Sep 17 00:00:00 2001
From: Domenic Denicola The various script-fetching algorithms below have two hooks that may be customized by their
+ callers: set up the request, which takes a
+ request object which it may modify before the algorithm
+ continues validate the response, which takes
+ a response object and must either accept or reject
+ it. Service Workers is an example of a specification that runs these
+ algorithms with its own options for the hooks. To fetch a classic script for a If the caller specified custom steps to set
+ up the request, perform them on request. Fetch request.Fetching scripts
+
+
+
+
+ script
element element,
given a url, a CORS setting, a settings object, and a
character encoding, run these steps. The algorithm will asynchronously complete with
@@ -84189,6 +84207,9 @@ interface NavigatorOnLine {
data-x="">script", and its destination
to "script
".
If the caller specified custom steps to validate the response, perform them on + response. If they reject the response, complete this algorithm with null, + and abort these steps.
If response's Content Type metadata, if any, specifies a character encoding, and the user agent supports that encoding, then set character encoding to that encoding (ignoring the passed-in value).
same-origin
", and whose use-URL-credentials flag is set.
+ If the caller specified custom steps to set + up the request, perform them on request.
Fetch request.
If the caller specified custom steps to validate the response, perform them on + response. If they reject the response, complete this algorithm with null, + and abort these steps.
Let source text be the result of UTF-8 decoding response's body.
If ancestor list is not given, let it be an empty list.
Fetch a single module script given url, credentials - mode, destination, and settings object.
+ mode, destination, and settings object. If the caller of this + algorithm specified custom set up the + request or validate the response + steps, pass those along while fetching a single + module script.Return from this algorithm and run the following steps when fetching a single module script asynchronously completes with @@ -84341,6 +84379,11 @@ interface NavigatorOnLine { data-x="concept-module-script-credentials-mode">credentials mode, destination, module script's settings object, and ancestor list.
+It is intentional that no custom set up the request or validate the response steps are passed along + here. Those hooks only apply to the top-level fetch at the root of the module script tree.
+If any of the fetch a module script tree invocations asynchronously complete with null, the user agent may terminate any or all of the other fetches, and must then asynchronously complete this algorithm with null.
@@ -84378,6 +84421,9 @@ interface NavigatorOnLine { mode, and client is settings object.If the caller specified custom steps to set + up the request, perform them on request.
Fetch request.
The caller specified custom steps to validate the response, which when performed + on response reject it.