Re: [w3c/ServiceWorker] Adding a developer-provided name (#1121)

As far as I understood, what https://github.com/whatwg/html/issues/2477 suggests is to give a name to a worker global scope basically. I think we'd need to consider two more aspects when it comes to SW:
1. A SW's name can't be assigned by devs. It should be something UA would assign instead.
2. The service worker struct instance to the ServiceWorkerGlobalScope instance can be 1 to N relationship. A cold start of a service worker creates a new ServiceWorkerGlobalScope object.

That said, I don't think the name for debugging is much relevant to SW case. As @n8schloss suggests, if we need an id for debugging, exposing service worker's id as `ServiceWorker.id` would be nice. `ServiceWorker.id` + `ServiceWorker.state` can identify a certain service worker in the platform I think.

-- 
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/1121#issuecomment-294806613

Received on Tuesday, 18 April 2017 11:57:51 UTC