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
A <dfn export id="dfn-service-worker-registration" for="">service worker registration</dfn> is a tuple of a [=service worker registration/scope url=] and a set of [=/service workers=], an <a>installing worker</a>, a <a>waiting worker</a>, and an <a>active worker</a>. A user agent *may* enable many [=/service worker registrations=] at a single origin so long as the [=service worker registration/scope url=] of the [=/service worker registration=] differs. A [=/service worker registration=] of an identical [=service worker registration/scope url=] when one already exists in the user agent causes the existing [=/service worker registration=] to be replaced.
216
219
220
+
A [=/service worker registration=] has an associated <dfn export id="dfn-origin">origin</dfn>
221
+
217
222
A [=/service worker registration=] has an associated <dfn export id="dfn-id">id</dfn>.
218
223
219
224
A [=/service worker registration=] has an associated <dfn export id="dfn-scope-url">scope url</dfn> (a [=/URL=]).
A [=/service worker registration=] has an associated <dfn export>navigation preload header value</dfn>, which is a [=byte sequence=]. It is initially set to \`<code>true</code>\`.
240
245
241
-
A [=/service worker registration=] is said to be <dfn export id="dfn-service-worker-registration-unregistered">unregistered</dfn> if [=id to registration map=][this [=/service worker registration=]'s [=service worker registration/id=]] is not this [=/service worker registration=].
246
+
A [=/service worker registration=] is said to be <dfn export id="dfn-service-worker-registration-unregistered">unregistered</dfn> if [=id to registration map=][(|origin|,|id|)] is not this [=/service worker registration=], where |origin| and |id| are this [=service worker registration=]'s [=service worker registration/origin=] and [=service worker registration/id=] respectively.
A user agent *must* persistently keep a list of <a>registered</a>[=/service worker registrations=] unless otherwise they are explicitly <a>unregistered</a>. A user agent has an <a>id to registration map</a> that stores the entries of the tuple of [=/service worker registration=]'s [=service worker registration/id=] and the corresponding [=/service worker registration=]. The lifetime of [=/service worker registrations=] is beyond that of the {{ServiceWorkerRegistration}} objects which represent them within the lifetime of their corresponding [=/service worker clients=].
251
+
A user agent *must* persistently keep a list of <a>registered</a>[=/service worker registrations=] unless otherwise they are explicitly <a>unregistered</a>. A user agent has an <a>id to registration map</a> that stores the entries of the tuple of [=/service worker registration=]'s ([=service worker registration/origin=],[=service worker registration/id=]) and the corresponding [=/service worker registration=]. The lifetime of [=/service worker registrations=] is beyond that of the {{ServiceWorkerRegistration}} objects which represent them within the lifetime of their corresponding [=/service worker clients=].
1. [=map/For each=] |id| → |registration| of [=id to registration map=]:
787
+
1. [=map/For each=] |key| → |registration| of [=id to registration map=]:
783
788
1. Let |scope| be |registration|'s [=service worker registration/scope url=], [=URL serializer|serialized=].
784
-
1. If the[=url/origin=] of the result of [=URL parser|parsing=] |scope| is the [=same origin|same=] as |client|'s [=environment settings object/origin=], then [=append=] |registration| to |registrations|.
789
+
1. If |registration|'s [=service worker registration/origin=] is the [=same origin|same=] as |client|'s [=environment settings object/origin=], then [=append=] |registration| to |registrations|.
785
790
1. [=Queue a task=] on |promise|'s [=relevant settings object=]'s [=responsible event loop=], using the [=DOM manipulation task source=], to run the following steps:
786
791
1. Let |registrationObjects| be a new [=list=].
787
792
1. [=list/For each=] |registration| of |registrations|:
The following definitions are the user agent's internal data structures used throughout the specification.
2342
2347
2343
-
An <dfn id="dfn-id-to-registration-map">id to registration map</dfn> is an <a>ordered map</a> where the keys are [=service worker registration/ids=] and the values are [=/service worker registrations=].
2348
+
An <dfn id="dfn-id-to-registration-map">id to registration map</dfn> is an <a>ordered map</a> where the keys are ([=environment settings object/origin=],[=service worker registration/id=]) and the values are [=/service worker registrations=].
2344
2349
2345
2350
A <dfn id="dfn-job">job</dfn> is an abstraction of one of register, update, and unregister request for a [=/service worker registration=].
0 commit comments