diff --git a/docs/index.bs b/docs/index.bs index 49e65c83..fb1612b6 100644 --- a/docs/index.bs +++ b/docs/index.bs @@ -88,6 +88,8 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/ text: delay the load event; for: document; url: delay-the-load-event urlPrefix: origin.html text: creating a policy container from a fetch response + urlPrefix: workers.html + text: active needed worker urlPrefix: webappapis.html text: module map; url: module-map text: resolve a module specifier; url: resolve-a-module-specifier @@ -280,6 +282,14 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231 A shared worker client is a [=/service worker client=] whose [=environment settings object/global object=] is a {{SharedWorkerGlobalScope}} object. A worker client is either a dedicated worker client or a shared worker client. + + A [=/service worker client=] is said to be a fully active client if either of the following is true: + * It is a [=window client=] whose [=responsible document=] is [=fully active=]. + * It is a [=worker client=] that is an [=active needed worker=]. + + To discard a client, given a [=/service worker client=] |client|, run the following steps: + 1. If |client| is a [=window client=], then [=discard a document|discard=] its [=responsible document=]. + 2. Else if |client| is a [=worker client=], then [=terminate a worker|terminate=] it.
@@ -1337,6 +1347,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231 1. Run these substeps in parallel: 1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the same as the associated [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]: 1. If |client|'s [=environment/id=] is not |id|, [=continue=]. + 1. If |client| is not a [=fully active client=], [=break=]. 1. Wait for either |client|'s [=environment/execution ready flag=] to be set or for |client|'s [=discarded flag=] to be set. 1. If |client|'s [=environment/execution ready flag=] is set, then invoke [=Resolve Get Client Promise=] with |client| and |promise|, and abort these steps. 1. Resolve |promise| with undefined. @@ -1353,6 +1364,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231 1. Let |targetClients| be a new [=list=]. 1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the [=same origin|same=] as the associated [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]: 1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=]. + 1. If |client| is not a [=fully active client=], [=continue=]. 1. If |client| is not a [=secure context=], [=continue=]. 1. If |options|["{{ClientQueryOptions/includeUncontrolled}}"] is false, and if |client|'s [=active service worker=] is not the associated [=ServiceWorkerGlobalScope/service worker=], [=continue=]. 1. Add |client| to |targetClients|. @@ -1435,6 +1447,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231 1. Run the following substeps in parallel: 1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the same as the [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]: 1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=]. + 1. If |client| is not a [=fully active client=], [=discard a client|discard=] it and [=continue=]. 1. If |client| is not a [=secure context=], [=continue=]. 1. Let |registration| be the result of running Match Service Worker Registration algorithm passing |client|'s creation URL as the argument. 1. If |registration| is not the [=ServiceWorkerGlobalScope/service worker=]'s containing service worker registration, [=continue=].