Re: [slightlyoff/ServiceWorker] Handling race conditions - API for accessing pending requests? (#959)

I guess something simple like this could be used:

```js
self.addEventListener('fetch', event => {
  self.requests.match(event.request).then(inflight => {
    return inflight || fetch(event.request);
  });
});
```
This also can potentially solve the issue in 
https://github.com/slightlyoff/ServiceWorker/issues/920

-- 
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/959#issuecomment-240586907

Received on Thursday, 18 August 2016 00:07:29 UTC