Re: [ServiceWorker] Add an API to take over uncontrolled pages (or pages controlled by another service worker) (#586)

@KenjiBaheux 

> On top of rejecting for non-active SW, let me note that you opted for returning undefined

What's the alternative?

@seanlong @michael-nordman 

> Should the step ```Let registration be the result of "Match Service Worker Registration" for that client``` filter out registrations without an active worker?

Can you give me a situation that would produce a different result?

If the returned registration is unequal to the calling SW's registration, it'll be discarded in the next step. If the returned registration is equal to the calling SW's registration, but there's no active worker, wouldn't we have already failed in step 1?

Or, is the issue that states may have changed between step 1 and 3.1.3? We should probably ensure that the calling worker is *still* active once we get to 3.1.3, and reject if it isn't.

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

Received on Monday, 2 February 2015 05:20:15 UTC