Re: [w3c/ServiceWorker] Inconsistencies due to when clients are created (#870)

@slightlyoff, I think we can do something like this:

```js
self.onfetch = e => {
  if (e.request.destination === 'document') {
    // This is a navigation.
    clients.get(e.targetClientId).then(client => {
      if (client.ancestorOrigins.length === 0) {
        // And it's a top-level.
      }
    });
  }
};
```

-- 
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/870#issuecomment-245481277

Received on Thursday, 8 September 2016 03:07:07 UTC