- From: Ben Kelly <notifications@github.com>
- Date: Thu, 07 Apr 2016 07:45:55 -0700
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Thursday, 7 April 2016 14:46:52 UTC
> FetchEvent.waitUntil can be called at any time while the worker is alive, and the browser will respect that hint I think this should only be allowed if there is already a promise extending the life of the service worker. So you can call `waitUntil()` asynchronously if you've already called `respondWith()` or event another `waitUntil()`. I don't think we should just allow `waitUntil()` out of the blue without any current promise holding the worker alive because it will lead to racy code in production. Sometimes their waitUntil() will get called in time and sometimes the worker will get killed first. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/771#issuecomment-206937246
Received on Thursday, 7 April 2016 14:46:52 UTC