Re: [w3c/ServiceWorker] Provide a one-line way to listen for a waiting Service Worker (#1222)

This API is full of surprises! I think I got confused because the the new service worker is the `reg.active` service worker; the name "active" made me wrongly think that it had already activated, but, sure enough, MDN clearly says that the `active` property refers to the "activating or activated" SW.

So, uh, `installing` can be tracked with `ServiceWorkerRegistration.onupdatefound`; `activating` can be tracked with `navigator.serviceWorker.oncontrollerchange`, and it is therefore annoying to listen to `installed`, `activated`, and `redundant`. Is that right?

Am I now right in understanding that the only known reasons to listen for the `activated` and `redundant` states are for logging purposes? (Either error logging or performance logging?)

-- 
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/1222#issuecomment-351829688

Received on Thursday, 14 December 2017 20:41:22 UTC