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

> You shouldn't add event listeners inside other event listeners. Once the service worker is terminated (which happens after a period of not being used, or when the browser shuts down) your fetch listener is gone, because next time the SW runs the activate event isn't fired.

Good tip! I'll make the change and keep that in mind. Fetch->Idle and Terminated->Idle  -  gotcha.

Please indulge me that the latent bug has not manifested in the test case as yet.

> Also, if you want to intercept a fetch request, you must call event.respondWith within the event callback.

I thought I was. Could you please define/scope ***"within the event callback"***? In-line?

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

Received on Friday, 11 March 2016 13:59:04 UTC