Re: [ServiceWorker] Have clients.claim() wait until controllers have changed before resolving (#799)

After thinking about this more, I realized that what I initially proposed, with the assumptions I was making, would lead to a deadlock.

Let me rephrase this feature request: it would be useful if there were a promise exposed on `navigator.serviceWorker` that only resolved once the page was controlled by (any) service worker. I had incorrectly assumed that `navigator.serviceWorker.ready` was such a promise, and I had written a bunch of (flakey!) unit tests based on that assumption, but that's wrong, so I guess I'm asking for a new promise in addition to `.ready`.

Listening for `controllerchange` on `navigator.serviceWorker` is a workaround, I suppose.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/799#issuecomment-163779094

Received on Thursday, 10 December 2015 22:59:07 UTC