- From: Jake Archibald <notifications@github.com>
- Date: Sat, 06 Aug 2016 02:26:08 -0700
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Saturday, 6 August 2016 09:26:37 UTC
@ju-lien > It's remove the meaning of "this.addEventListener('fetch'", what will be the meaning of "this." ? A random SW scope ? So it could be a good thing to change this syntax to register handler and avoid confusions. I'm not sure I understand this. `this` will be the global scope of the worker. Due to how the service worker shuts down when it isn't in use, the value of `this` in terms of JS equality may not be the same for two fetches. So if you do `this.foo = 'bar'` in one fetch, it may not be there in another fetch. Parallel workers makes `this` even less consistent between events, but it's already inconsistent. --- 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/756#issuecomment-238014709
Received on Saturday, 6 August 2016 09:26:37 UTC