diff --git a/fetch.bs b/fetch.bs index 559b752ec..3d102e73e 100644 --- a/fetch.bs +++ b/fetch.bs @@ -705,8 +705,27 @@ explicitly set request's this flag set are subject to additional processing requirements.
A request has an associated
-skip-service-worker flag. Unless stated otherwise it is
-unset.
+service-workers mode, that is "all
",
+"foreign
", or "none
". Unless stated otherwise it is
+"all
".
+
+
This determines which service workers will receive a {{fetch!!event}} event for this fetch. + +
all
"
+ foreign
"
+ none
"
+ A request has an associated initiator, which is @@ -2800,16 +2819,13 @@ optional CORS flag and CORS-preflight flag, run these steps:
Let actualResponse be null.
If request's skip-service-worker flag is unset, then run these +
If request's service-workers mode is not "none
", then run these
substeps:
If request's client is null or - request's client's - global object is not a - {{ServiceWorkerGlobalScope}} object, then set response - to the result of invoking handle fetch for request. +
If request's service-workers mode is "all
", then set
+ response to the result of invoking handle fetch for request.
[[!HTML]] [[!SW]]
If request's redirect mode is
- "follow
", then set request's skip-service-worker flag.
+ "follow
", then set request's service-workers mode to
+ "foreign
".
Redirects coming from the network (as opposed to from a service worker) are not to be exposed to a service worker. @@ -5192,6 +5209,10 @@ method, must run these steps: init as arguments. If this throws an exception, reject p with it and return p. +
foreign
".
+
Let responseObject be a new {{Response}} object and a new associated
{{Headers}} object whose guard is
"immutable
".
@@ -5343,7 +5364,7 @@ therefore not shareable, a WebSocket connection is very close to identical to an
Let request be a new request, whose
url is requestURL,
client is client,
- skip-service-worker flag is set,
+ service-workers mode is "none
",
synchronous flag is set,
mode is "websocket
",
credentials mode is