- From: Jake Archibald <notifications@github.com>
- Date: Tue, 29 Nov 2016 00:43:40 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Tuesday, 29 November 2016 08:44:12 UTC
Allowing: ```js const reg = await navigator.serviceWorker.ready; if (reg.waiting) { await reg.waiting.skipWaiting(); location.reload(); } ``` Usecase: The new service worker has installed, I've shown a message to the user like "New version found. Update now?", which they have clicked. Currently developers have to `postMessage` to the service worker for this behaviour. It's also an opportunity for us to rethink when `skipWaiting` should resolve in this case. It could resolve once the service worker has begun `activating`. -- 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/1016
Received on Tuesday, 29 November 2016 08:44:12 UTC