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

The properties and methods of the reserved client are a little hacky, but here's my take:

```js
self.addEventListener('fetch', event => {
  if (event.reservedClientId) {
    clients.get(event.reservedClientId).then(c => console.log(c));
  }
});
```

* `url` - same as `event.request.url`
* `frameType` - do we have enough info to set the right value here?
* `id` - `event.reservedClientId`
* `postMessage()` - buffered until the client is created. Dropped if the client is never created.

Reserved window clients:

* `visibilityState` - the visibility state of the target window
* `focused` - the focused state of the target window
* `focus()` - rejects
* `navigate()` - rejects

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

Received on Thursday, 8 September 2016 11:04:22 UTC