Skip to content

Commit 9c02deb

Browse files
authored
Partition clients API by storage key. (#1606) (#1632)
1 parent b8ce378 commit 9c02deb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/index.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
13491349

13501350
1. Let |promise| be a new <a>promise</a>.
13511351
1. Run these substeps <a>in parallel</a>:
1352-
1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the <a lt="same origin">same</a> as the associated [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]:
1352+
1. For each [=/service worker client=] |client| where the result of running [=obtain a storage key=] given |client| [=storage key/equals=] the associated [=ServiceWorkerGlobalScope/service worker=]'s [=containing service worker registration=]'s [=service worker registration/storage key=]:
13531353
1. If |client|'s [=environment/id=] is not |id|, [=continue=].
13541354
1. Wait for either |client|'s [=environment/execution ready flag=] to be set or for |client|'s [=discarded flag=] to be set.
13551355
1. If |client|'s [=environment/execution ready flag=] is set, then invoke [=Resolve Get Client Promise=] with |client| and |promise|, and abort these steps.
@@ -1365,7 +1365,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
13651365
1. Let |promise| be [=a new promise=].
13661366
1. Run the following steps [=in parallel=]:
13671367
1. Let |targetClients| be a new [=list=].
1368-
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=]:
1368+
1. For each [=/service worker client=] |client| where the result of running [=obtain a storage key=] given |client| [=storage key/equals=] the associated [=ServiceWorkerGlobalScope/service worker=]'s [=containing service worker registration=]'s [=service worker registration/storage key=]:
13691369
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
13701370
1. If |client| is not a [=secure context=], [=continue=].
13711371
1. If |options|["{{ClientQueryOptions/includeUncontrolled}}"] is false, and if |client|'s [=active service worker=] is not the associated [=ServiceWorkerGlobalScope/service worker=], [=continue=].
@@ -1433,7 +1433,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
14331433
1. Let |focusState| be the result of running the <a>has focus steps</a> with |newContext|'s <a>active document</a> as the argument.
14341434
1. Let |ancestorOriginsList| be |newContext|'s <a>active document</a>'s <a>relevant global object</a>'s {{Location}} object's [=Location/ancestor origins list=]'s associated list.
14351435
1. [=Queue a task=] to run the following steps on |serviceWorkerEventLoop| using the [=DOM manipulation task source=]:
1436-
1. If |newContext|'s {{Window}} object's [=environment settings object=]'s [=creation URL=]'s [=environment settings object/origin=] is not the [=same origin|same=] as the [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=], resolve |promise| with null and abort these steps.
1436+
1. If the result of running [=obtain a storage key=] given |newContext|'s {{Window}} object's [=environment settings object=] is not [=storage key/equal=] to the [=ServiceWorkerGlobalScope/service worker=]'s [=containing service worker registration=]'s [=service worker registration/storage key=], then resolve |promise| with null and abort these steps.
14371437
1. Let |client| be the result of running [=Create Window Client=] with |newContext|'s {{Window}} object's [=environment settings object=], |frameType|, |visibilityState|, |focusState|, and |ancestorOriginsList| as the arguments.
14381438
1. Resolve |promise| with |client|.
14391439
1. Return |promise|.
@@ -1447,7 +1447,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
14471447
1. If the [=ServiceWorkerGlobalScope/service worker=] is not an <a>active worker</a>, return a <a>promise</a> rejected with an "{{InvalidStateError}}" {{DOMException}}.
14481448
1. Let |promise| be a new <a>promise</a>.
14491449
1. Run the following substeps <a>in parallel</a>:
1450-
1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the <a lt="same origin">same</a> as the [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]:
1450+
1. For each [=/service worker client=] |client| where the result of running [=obtain a storage key=] given |client| [=storage key/equals=] the [=ServiceWorkerGlobalScope/service worker=]'s [=containing service worker registration=]'s [=service worker registration/storage key=]:
14511451
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
14521452
1. If |client| is not a [=secure context=], [=continue=].
14531453
1. Let |storage key| be the result of running [=obtain a storage key=] given |client|.

0 commit comments

Comments
 (0)