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 [=/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
240
241
-
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.
241
+
A [=/service worker registration=] is said to be <dfn export id="dfn-service-worker-registration-unregistered">unregistered</dfn> if [=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/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=].
246
+
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 a<a>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=] |key| → |registration| of [=id to registration map=]:
788
+
1. [=map/For each=] |key| → |registration| of [=registration map=]:
789
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|.
790
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:
[=/Service workers=] introduce new persistent storage features including <a>id to registration map</a> (for [=/service worker registrations=] and their [=/service workers=]), [=request response list=] and <a>name to cache map</a> (for caches), and [=script resource map=] (for script resources). In order to protect users from any potential <a biblio data-biblio-type="informative" lt="unsanctioned-tracking">unsanctioned tracking</a> threat, these persistent storages *should* be cleared when users intend to clear them and *should* maintain and interoperate with existing user controls e.g. purging all existing persistent storages.
2296
+
[=/Service workers=] introduce new persistent storage features including <a>registration map</a> (for [=/service worker registrations=] and their [=/service workers=]), [=request response list=] and <a>name to cache map</a> (for caches), and [=script resource map=] (for script resources). In order to protect users from any potential <a biblio data-biblio-type="informative" lt="unsanctioned-tracking">unsanctioned tracking</a> threat, these persistent storages *should* be cleared when users intend to clear them and *should* maintain and interoperate with existing user controls e.g. purging all existing persistent storages.
The following definitions are the user agent's internal data structures used throughout the specification.
2356
2356
2357
-
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=].
2357
+
A<dfn id="dfn-id-to-registration-map">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=].
2358
2358
2359
2359
A <dfn id="dfn-job">job</dfn> is an abstraction of one of register, update, and unregister request for a [=/service worker registration=].
A <dfn id="dfn-job-queue">job queue</dfn> is a thread safe [=queue=] used to synchronize the set of concurrent [=jobs=]. The [=job queue=] contains [=jobs=] as its [=queue/items=]. A [=job queue=] is initially empty.
2397
2397
2398
-
A <dfn id="dfn-id-to-job-queue-map">id to job queue map</dfn> is an <a>ordered map</a> where the keys are ([=environment settings object/origin=],[=service worker registration/ids=]) and the values are [=job queues=].
2398
+
A <dfn id="dfn-id-to-job-queue-map">job queue map</dfn> is an <a>ordered map</a> where the keys are ([=environment settings object/origin=],[=service worker registration/ids=]) and the values are [=job queues=].
2399
2399
2400
2400
A <dfn id="dfn-bad-import-script-response">bad import script response</dfn> is a [=/response=] for which any of the following conditions are met:
1. [=map/For each=]<var ignore>key</var> → |registration| of <a>id to registration map</a>:
3181
+
1. [=map/For each=]<var ignore>key</var> → |registration| of <a>registration map</a>:
3182
3182
1. If |registration|'s <a>installing worker</a> |installingWorker| is not null, then:
3183
3183
1. If |registration|'s [=waiting worker=] is null and |registration|'s [=active worker=] is null, invoke <a>Clear Registration</a> with |registration| and continue to the next iteration of the loop.
1. Let |scopeString| be [=URL serializer|serialized=] |scope| with the *exclude fragment flag* set.
3240
3240
1. Let |registration| be a new [=/service worker registration=] whose [=service worker registration/origin=] is set to |origin|, [=service worker registration/id=] is set to |id|, and [=service worker registration/update via cache mode=] is set to |updateViaCache|.
3241
-
1. [=map/Set=]<a>id to registration map</a>[|id|] to |registration|.
3241
+
1. [=map/Set=]<a>registration map</a>[|id|] to |registration|.
0 commit comments