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
Add ServiceWorkerRegistration.id and supporting algorithm changes. (Fixes#1512)
This commit adds support for a registration `id` value. This will be used to uniquely identify registrations
instead of `scope`. This will make it easier for a developer to migrate a registration from one `scope` to
another.
The commit consists of the following changes:
* Add a DOMString `id` and associated getter to the registration.
* Add an `origin` to the internal registration type.
* Move the `scope` internal representation to `ServiceWorker` and add a new getter.
* Make the `ServiceWorkerRegistration.scope` return the oldest associated worker's `scope`.
* Migrate the registration map to be keyed by the tuple `(origin,id)`.
* Migrate the job queue map to be keyed by the tuple `(origin,id)`.
* Adjust job equality checks to treat register jobs to account for new id and scope semantics.
* Support changing the scope during register operations.
* Reject register operations that change the scope to a value that is already in use by another registration.
* Properly un-control clients whose URL no longer matches a new active worker's scope.
0 commit comments