Re: [w3c/ServiceWorker] Making a concurrent request for navigations (#920)

I agree that makes sense indeed especially for `await`.

> That would work. But I'm not sure why you wouldn't just do

`respondWith` should be called in sync, AFAIK. Probably this could work instead:
```js
const wait = event.navigationPreload.then(res => {
  if (res) {
    event.respondWith(res);
  } else {
    // ...
  }
});

event.waitUntil(wait);
```

-- 
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/920#issuecomment-255892009

Received on Monday, 24 October 2016 23:12:43 UTC