- From: Yoav Weiss <notifications@github.com>
- Date: Fri, 08 Jul 2016 00:29:22 -0700
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc:
Received on Friday, 8 July 2016 07:30:03 UTC
@wanderview overriding `self.fetch` and `self.caches` can probably satisfy the basic "lower layer interception" use-case, so it might be good enough for what I'm trying to do. (aside: isn't `XMLHTTPRequest` unavailable from a SW context?) It does add complexity (as the code would need to be significantly different if the site has a SW or not, and I'd have to make sure that the overriding happens before the site's SW is run), and I'm having a hard time figuring out how/if a similar model can be used to receive push notifications. (I see how I can intercept them by creating wrappers around the entire SW registration process, which seems be a bit much) Also, IIUC, I'd have to override these values on each `fetch` call, as I can't rely on the SW state to remain intact between events. Is that correct? --- 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/921#issuecomment-231293890
Received on Friday, 8 July 2016 07:30:03 UTC