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

That would work. But I'm not sure why you wouldn't just do
```js
event.navigationPreload.then(res => {
  if (res) {
    event.respondWith(res);
  } else {
    // ...
  }
});
```

Comparing it with 

```js
if (event.hasNavigationPreload) {
  event.respondWith(event.navigationPreload);
} else {
  // ...
}
```

it seems like at most you'd lose a single microtask in the no-navigation-preload case, and they'd be equivalent in the yes-navigation-preload case.

-- 
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-255890534

Received on Monday, 24 October 2016 23:03:56 UTC