- From: Ben Kelly <notifications@github.com>
- Date: Mon, 08 May 2017 14:38:41 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/issues/1091/299998544@github.com>
@jakearchibald, I'm kind of confused by https://github.com/w3c/ServiceWorker/issues/1091#issuecomment-291048685. I don't recall this being the outcome from the f2f meeting.
I thought we said we were going to do:
* client: the client initiating the load just like we do for non-replacement cases
* reserved client: the client currently attached to the about:blank window
* target client: I don't remember, but the about:blank window would make sense to me.
If you don't want the existing about:blank to be "reserved" since its already execution ready, we could also do:
* client: the client initiating the load just like we do for non-replacement cases
* reserved client: null
* target client: I don't remember, but the about:blank window would make sense to me.
So in:
```
// foo.html
let f = document.createElement('iframe');
document.body.appendChild(f);
f.contentWindow.someGlobalStatus = 'yuck';
f.src = 'frame.html';
```
I guess I would always expect `FetchEvent.clientId` to reference the foo.html parent window here.
It also seems to make sense to make `FetchEvent.targetClientId` reference the current about:blank iframe client.
I can go either way about whether `FetchEvent.reservedClientId` should be null or the iframe client. I guess from an implementation point of view null would be slightly more convenient for me.
@smaug---- also was wondering what we do if replacement load is for a download. The example he gave was:
```
win = window.open(); win.document.body.innerHTML = "<a href='http://download.me.com/foo.zip'>zip</a>"
```
In this case, if someone clicked the link I would expect:
* the `.clientId` to be the about:blank window (since its an anchor tag),
* the reserved client to be null (if we decide to go that way above)
* the target client to be the about:blank window since we don't know yet if it will download
If it was `<a download>` then I would expect the target client to be null.
--
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/1091#issuecomment-299998544
Received on Monday, 8 May 2017 21:39:15 UTC