-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move installEvent.replace() onto ServiceWorkerClients #518
Comments
I'm fine with this renaming/location. |
Tracked via http://crbug.com/430639 in Blink |
@paullewis reads |
I'm still of the persuasion that we should have a subject-verb-object approach, i.e. But if we're absolutely set that clients is the right place then perhaps a more |
It's more than just a notification, it's a (potentially) hostile takeover. I've updated the algorithm in the original post to be more accurate. |
OK, I can see |
We moved it off However, maybe the force takeover and force upgrade parts of this API need splitting out. I don't have any use-cases for using them separately, but they are two distinct actions.
|
I'm going to tackle steps 1-3 first, via a "skip waiting" flag on the worker, with ways to set this from the worker's global scope and the worker object itself. |
Added the flag c839e33 |
I'm going for
Bikeshed away. |
@jakearchibald looks nice! Just added a few steps back which were added to solve #364: 6d2cc26. And changed a type from |
|
|
Use Case comes from @paullewis, paraphrasing:
reloadAll()
would better suit this use case, but we're a while off specing that (it's huge and full of new things).Paul's use case isn't possible because the install event has been and gone, so the opportunity to call
replace()
has passed. We already movedreloadAll()
toServiceWorkerClients
before we punted on it, I thinkreplace()
makes more sense there too, renamed something liketakeControl
.So, if a ServiceWorker calls
clients.takeControl()
:The text was updated successfully, but these errors were encountered: