Re: [w3c/ServiceWorker] ready promise is kind of weird with overlapping scopes (#1278)

> I think we're already maintaining .ready for each context. Yes, alerting each context from unregister and Activate would have to be added. We're already doing similar signaling for statechange events and controllerchange events.

Well, there is a slight difference in we only have to signal statechange and controllerchange events where a `ServiceWorker` is actually controlling the client or already referenced by js.

>From an implementation perspective its nice to be able to lazy create the `.ready` promise so we don't have to manage signaling activation to potentially every client open in the browser.  Its doable, but its some memory/cpu overhead that it would be nice to avoid.  Lazy creation allows us to only signal clients where js has touched the `.ready` promise.

-- 
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/1278#issuecomment-366745776

Received on Monday, 19 February 2018 16:40:14 UTC