- From: Jeffrey Posnick <notifications@github.com>
- Date: Wed, 24 Oct 2018 13:02:07 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 24 October 2018 20:02:28 UTC
Here'a a late suggestion, given that this looks to be on the agenda for tomorrow's F2F: would exposing the [`skip waiting flag`](https://w3c.github.io/ServiceWorker/#dfn-skip-waiting-flag) as a `readonly attribute` on the Web IDL for the [`ServiceWorker`](https://w3c.github.io/ServiceWorker/#serviceworker-interface) interface solve some of the use cases? Code that I've used in the past to in the `window` context to [detect service worker state changes](https://gist.github.com/jeffposnick/f3e173a89adfd0ce1e664442ae7f8a27#file-register-sw-js-L15-L18) would benefit from knowing whether or not the `skip waiting flag` is set, as the message you'd end up presenting to users ("close all tabs to update" vs. "reload to update") may end up being different for each of those scenarios. This doesn't provide what initial requestor was asking for, in that you still need to listen for event changes. But it at least would expose one extra bit of useful information that would open the door to using generic `window` client code without hardcoded messages tailored to whether or not `skipWaiting()` was called during the updated service worker's installation. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/issues/1222#issuecomment-432807374
Received on Wednesday, 24 October 2018 20:02:28 UTC