Re: [w3c/ServiceWorker] consider allowing a non-scope identifier for registrations (#1512)

I think https://github.com/w3c/ServiceWorker/issues/1085 made the case for why id's are potentially quite useful.  If you have a complex site using a complex ServiceWorker, having registrations named using a site-provided id lets one create "v1" and "v2" registrations and then identify what version is currently controlling a scope, determine whether it's installed, pivot it into place, etc.  The current ServiceWorker model for registrations and updates doesn't correspond well with the reality of how software/websites are developed.  This enhancement helps address that and having the id makes that much more straightforward.

From a testing perspective I think the id is also invaluable.  This can be reverse engineered by ensuring you have a global that lives for the entire duration of a test that leverages the object identity of the ServiceWorkerRegistrations to assign persistent names to them, but that's a lot of work in a world where it's already difficult to write, let alone understand, ServiceWorker tests.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1512#issuecomment-707851209

Received on Tuesday, 13 October 2020 16:14:12 UTC