Re: [ServiceWorker] Fetch API respondWith's implicit RETURN (#844)

Thanks for the pointer. Please refer to that version. And here's some explanation to the question:

The steps in `respondWith(r)` are synchronized with the steps in [Handle Fetch](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#on-fetch-request-algorithm) where this event's listener was invoked.

respond-with entered flag is being checked in Handle Fetch step 18.6.3, and if not set, the original request goes to the network. wait-to-respond flag is used to synchronize those steps such that Handle Fetch can wait until the promise given to respondWith settles.

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

Received on Friday, 11 March 2016 08:03:35 UTC