Re: [ServiceWorker] setTimeout/setInterval are unreliable in ServiceWorkers (#838)

Trying to get this clear in my head. 

ExtendedEvent.waitUntil() offers viability guarantees that Promise.race() or .all() cannot and does not? Is that correct? Is it because Promise is standard ECMAscript and waitUntil() is SW aware?

I've looked at https://github.com/slightlyoff/ServiceWorker/issues/738 "Describe waitUntil() behavior in terms of Promise.all()". I've also looked at https://developer.mozilla.org/en-US/docs/Web/API/ExtendableEvent/waitUntil and the spec.

Is there better documentation available somewhere?

My guess now is that waitUntil will only work within the EventHandler context of an the few (currently 8?) Extendable events used by ServiceWorkers and that is the only environment providing sanctuary from the idle SW watchDog. But please feel free to wax lyrical on this topic.


---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/838#issuecomment-188492716

Received on Wednesday, 24 February 2016 22:41:37 UTC