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

> 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?

The situation happens when a registration which only has a installing worker is a longer matched registration than the calling SW's registration. The calling SW will not claim in this situation.

Currently in Blink impl, navigation fetch will choose the longest matched registration which has a active/waiting worker(seems different from sepc [[Handle Fetch]] 12.2 & 12.3, if the longest matched registration only has a installing worker it will not be used). Not sure whether the .claim() should behave the same?

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

Received on Monday, 2 February 2015 06:36:29 UTC