- From: Ben Kelly <notifications@github.com>
- Date: Tue, 06 Apr 2021 08:39:55 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 6 April 2021 15:40:08 UTC
That is more concise, but doesn't seem that much better than:
```javascript
var cache;
var init_promise = async function() {
cache = await readDataFromStorage();
}();
self.addEventListener('fetch', evt =>{
evt.respondWith(async function() {
await init_promise;
// use cache data
}());
});
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1576#issuecomment-814221416
Received on Tuesday, 6 April 2021 15:40:08 UTC