diff --git a/source b/source index 4d8cb26a588..1f8d9321af5 100644 --- a/source +++ b/source @@ -14750,24 +14750,34 @@ interface HTMLLinkElement : HTMLElement {
Fetch request with processResponseConsumeBody set to the following steps - given response response:
+ given response response and null, failure, or + a byte sequence bytesOrNull:Finalize and report timing with response, el's node document's relevant global object, and initiatorType.
Let success be true.
If response is a network error or its status is not an ok - status, set success to false.
+If either of the following conditions are met:
+ +bytesOrNull is null or failure; or
response's status is not an + ok status,
then set success to false.
Note that content-specific errors, e.g., CSS parse errors or PNG decoding errors, do not affect success.
If success is true, wait for the link
+ Otherwise, wait for the link
resource's critical subresources to finish loading. The specification that defines a link type's critical subresources
@@ -14777,8 +14787,9 @@ interface HTMLLinkElement : HTMLElement {
be fetched and processed, with the expectation that this will be done correctly.
Process the linked resource given el, - success, and response.
Process the linked resource given el, success, and + response.
Fetch request with the following processResponseConsumeBody steps given - response response:
+ response response and null, failure, or a + byte sequence bytesOrNull:response can be either CORS-same-origin or CORS-cross-origin. This only affects how error reporting happens.
@@ -93113,10 +93125,16 @@ document.querySelector("button").addEventListener("click", bound);Set response to response's unsafe response.
If response's type is "error
", or response's status is not an ok status, then
- run onComplete given null, and abort these steps.
If either of the following conditions are met:
+ +bytesOrNull is null or failure; or
response's status is not an + ok status,
then run onComplete given null, and abort these steps.
For historical reasons, this algorithm does not include MIME type checking, unlike the other script-fetching algorithms in this section.
@@ -93136,8 +93154,8 @@ document.querySelector("button").addEventListener("click", bound);Let source text be the result of decoding - response's body to Unicode, using - character encoding as the fallback encoding.
+ bytesOrNull to Unicode, using character encoding as the fallback + encoding.The decode algorithm overrides character encoding if the file contains a BOM.
@@ -93176,14 +93194,14 @@ document.querySelector("button").addEventListener("click", bound);If performFetch was given, run performFetch with request, - true, and with processResponse as defined below.
+ true, and with processResponseConsumeBody as defined below.Otherwise, fetch request with processResponseConsumeBody set to - processResponse as defined below.
+ data-x="processResponseConsumeBody">processResponseConsumeBody as defined below. -In both cases, let processResponse given response response be the following algorithm:
+In both cases, let processResponseConsumeBody given response response and null, failure, or a byte + sequence bytesOrNull be the following algorithm:
Finalize and report timing with response, fetch client
@@ -93196,8 +93214,7 @@ document.querySelector("button").addEventListener("click", bound);
If either of the following conditions are met: response's type is " bytesOrNull is null or failure; or response's status is not an
ok status,
-
error
"; or
Let source text be the result of UTF-8 - decoding response's body.
Let script be the result of creating a classic script using source text, script settings object, response's To fetch a worklet script graph given a url, a fetch client settings object, a destination, a credentials mode, a module map settings - object, a module responses map, and an onComplete algorithm, - fetch a worklet/module worker script graph given url, fetch client - settings object, destination, credentials mode, module map - settings object, onComplete, and the following asynchronous perform - the fetch hook given request and , a module responses map + moduleResponsesMap, and an onComplete algorithm, fetch a + worklet/module worker script graph given url, fetch client settings + object, destination, credentials mode, module map settings + object, onComplete, and the following asynchronous perform the fetch + hook given request and processCustomFetchResponse:
If moduleResponsesMap[requestURL] exists, then run processCustomFetchResponse with - moduleResponsesMap[requestURL] and return.
If moduleResponsesMap[requestURL] exists, then:
+ +Let cached be moduleResponsesMap[requestURL].
Run processCustomFetchResponse with cached[0] and + cached[1].
Return.
Set moduleResponsesMap[requestURL] to
"fetching
".
Fetch request, with processResponseConsumeBody set to the following steps - given response response:
+ given response response and null, failure, or a + byte sequence bytesOrNull:Set moduleResponsesMap[requestURL] to - response.
Set moduleResponsesMap[requestURL] to (response, + bytesOrNull).
Run processCustomFetchResponse with response.
Run processCustomFetchResponse with response and + bytesOrNull.
If performFetch was given, run performFetch with request, - isTopLevel, and with processResponse as defined below.
+ isTopLevel, and with processResponseConsumeBody as defined below. -Otherwise, fetch request with - processResponse as processResponseConsumeBody.
+Otherwise, fetch request with processResponseConsumeBody as defined below.
-In both cases, let processResponse given response response be the following algorithm:
+In both cases, let processResponseConsumeBody given response response and null, failure, or a + byte sequence bytesOrNull be the following algorithm:
response is always CORS-same-origin.
@@ -93916,11 +93945,10 @@ document.querySelector("button").addEventListener("click", bound);If either of the following conditions are met:
response's type is "error
"; or
bytesOrNull is null or failure; or
response's status is not an - ok status.
then set moduleMap[(url, @@ -93929,8 +93957,7 @@ document.querySelector("button").addEventListener("click", bound);
Let source text be the result of UTF-8 - decoding response's body.
Let MIME type be the result of extracting
a MIME type from response's SharedWorkerGlobalScope : WorkerGlobalScope
In both cases, let performFetch be the following asynchronous perform the
- fetch hook given request, is
- top-level and given request, isTopLevel and processCustomFetchResponse: If isTopLevel is false, fetch
- request with processCustomFetchResponse as processResponseConsumeBody and return.
Fetch request. Return from this - algorithm, and run the remaining steps as part of the fetch's process response for - the response response.
Fetch request with with processResponseConsumeBody set to the following steps + given response response and null, failure, or + a byte sequence bytesOrNull:
-Set worker global scope's url to response's url.
Set worker global scope's url to response's url.
Initialize worker global scope's - policy container given worker global scope, response, and - inside settings.
Initialize worker global scope's + policy container given worker global scope, response, and + inside settings.
If the Run CSP initialization for a global object algorithm returns "Blocked
" when executed upon worker global scope, set
- response to a network error.
If the Run CSP initialization for a global object algorithm returns "Blocked
" when executed upon worker global scope, set
+ response to a network error.
If worker global scope's embedder policy's value is compatible with cross-origin
- isolation and is shared is true, then set agent's agent
- cluster's cross-origin isolation
- mode to "logical
" or "concrete
". The one chosen is
- implementation-defined.
This really ought to be set when the agent cluster is created, which requires a - redesign of this section.
-If worker global scope's embedder policy's value is compatible with cross-origin
+ isolation and is shared is true, then set agent's agent
+ cluster's cross-origin isolation
+ mode to "logical
" or "concrete
". The one chosen is
+ implementation-defined.
This really ought to be set when the agent cluster is created, which requires a + redesign of this section.
+If the result of checking a - global object's embedder policy with worker global scope, outside - settings, and response is false, then set response to a - network error.
If the result of checking a + global object's embedder policy with worker global scope, outside + settings, and response is false, then set response to a + network error.
Set worker global scope's cross-origin isolated
- capability to true if agent's agent cluster's cross-origin isolation mode is "concrete
".
Set worker global scope's cross-origin isolated
+ capability to true if agent's agent cluster's cross-origin isolation mode is "concrete
".
If is shared is false and owner's cross-origin isolated - capability is false, then set worker global scope's cross-origin isolated - capability to false.
If is shared is false and owner's cross-origin isolated + capability is false, then set worker global scope's cross-origin isolated + capability to false.
If is shared is false and response's
- url's scheme is "data
", then set
- worker global scope's cross-origin isolated
- capability to false.
This is a conservative default for now, while we figure out how workers in
- general, and data:
URL workers in particular (which are
- cross-origin from their owner), will be treated in the context of permissions policies. See
- w3c/webappsec-permissions-policy
- issue #207 for more details.
If is shared is false and response's
+ url's scheme is "data
", then set
+ worker global scope's cross-origin isolated
+ capability to false.
This is a conservative default for now, while we figure out how workers in
+ general, and data:
URL workers in particular (which are
+ cross-origin from their owner), will be treated in the context of permissions policies. See
+ w3c/webappsec-permissions-policy
+ issue #207 for more details.
Run processCustomFetchResponse with response.
Run processCustomFetchResponse with response and + bytesOrNull.
In both cases, let onComplete given script be the following steps:
@@ -106326,8 +106359,10 @@ dictionary WorkletOptions {A Worklet
has a module
responses map, which is an ordered map from URLs to
- responses, initially empty. Access to this map should be
- thread-safe.
fetching
" or tuples consisting of a
+ response and either null, failure, or a byte
+ sequence representing the response body. This map is initially empty, and access to it
+ should be thread-safe.
The added modules list and