You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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=]:
1353
1353
1. If |client|'s [=environment/id=] is not |id|, [=continue=].
1354
1354
1. Wait for either |client|'s [=environment/execution ready flag=] to be set or for |client|'s [=discarded flag=] to be set.
1355
1355
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. 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=]:
1369
1369
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
1370
1370
1. If |client| is not a [=secure context=], [=continue=].
1371
1371
1. If |options|["{{ClientQueryOptions/includeUncontrolled}}"] is false, and if |client|'s [=active service worker=] is not the associated [=ServiceWorkerGlobalScope/service worker=], [=continue=].
1. Let |focusState| be the result of running the <a>has focus steps</a> with |newContext|'s <a>active document</a> as the argument.
1434
1434
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.
1435
1435
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.
1437
1437
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.
1. If the [=ServiceWorkerGlobalScope/service worker=] is not an <a>active worker</a>, return a <a>promise</a> rejected with an "{{InvalidStateError}}" {{DOMException}}.
1448
1448
1. Let |promise| be a new <a>promise</a>.
1449
1449
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=]:
1451
1451
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
1452
1452
1. If |client| is not a [=secure context=], [=continue=].
1453
1453
1. Let |storage key| be the result of running [=obtain a storage key=] given |client|.
0 commit comments