Re: [slightlyoff/ServiceWorker] Provide a convenience method to run code outside event handler (#866)

> Oh - so you can use both respondWidth and waitUntil together in parallel? I didn't realise that.

You can.  This is how I do it for my blog:

  https://github.com/wanderview/wanderview.github.com/blob/master/sw.js#L97

It appears, though, there might be an issue with `FetchEvent.waitUntil` in chrome at the moment:

  https://bugs.chromium.org/p/chromium/issues/detail?id=601095

Also note that currently you have to call `waitUntil` synchronously in the event handler, although the spec has changed to allow it to be called asynchronously any time up until the `respondWith` promise settles.  I don't think FF or chrome implement that yet.  It will make using `FetchEvent.waitUntil` much easier to use once we loosen that restriction.

---
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/866#issuecomment-206483499

Received on Wednesday, 6 April 2016 17:43:15 UTC