- From: Ben Kelly <notifications@github.com>
- Date: Wed, 24 Feb 2016 06:10:24 -0800
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Wednesday, 24 February 2016 14:10:57 UTC
Richard, wrapping the setTimeout() in a promise is good, but you are missing the waitUntil(). Something like: ``` addEventListener('install', function(evt) { evt.waitUntil(wait(1000).then(function() { // do delayed stuff })): }): ``` Implementing any kind of implied keep-alive state is problematic and prone to abuse. That's why we offer the explicit waitUntil(). --- Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/838#issuecomment-188270943
Received on Wednesday, 24 February 2016 14:10:57 UTC