Skip to content

Does replace/reloadAll() affect uncontrolled pages? #202

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jakearchibald opened this issue Mar 24, 2014 · 5 comments
Closed

Does replace/reloadAll() affect uncontrolled pages? #202

jakearchibald opened this issue Mar 24, 2014 · 5 comments

Comments

@jakearchibald
Copy link
Contributor

  • Page registers a SW for the first time (so .active is null)
  • That SW installs and calls .replace()

Should .active in the page now be the new ServiceWorker?

The algorithms say yes, but I've seen some comments in other threads suggest otherwise.

/cc @kinu @michael-nordman @alecf

@jakearchibald
Copy link
Contributor Author

@slightlyoff what's your understanding here?

@michael-nordman
Copy link
Collaborator

jake, my comments didn't mean to suggest otherwise, see #198 for details.

@alecf
Copy link
Contributor

alecf commented Mar 24, 2014

+1 for .active changing - especially since you'll be able to observe the sw itself changing via the onactivate event. I think this is a really nice feature for developers, that once a user "installs" / keeps the service worker, then all open windows can be "upgraded"

@jakearchibald
Copy link
Contributor Author

@michael-nordman ah, sorry! (although it wasn't just your comments)

Settled at .active changing

@slightlyoff
Copy link
Contributor

Sorry for the delayed response. What @alecf suggests is correct. Pages which match the extent of scope have their "implicit controller" replaced in these cases and wind up being controlled (and therefore, .active changes).

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

5 participants