Re: [w3c/ServiceWorker] consider Client behavior for windows where initial about:blank is replaced with a loaded document (#1091)

@wanderview, I think I should catch up a bit but in https://github.com/w3c/ServiceWorker/issues/1091#issuecomment-300817825:

> clientId = foo.html window

clientId for the snippet should be the about:blank client. clientId in my mental model is the request's client's id. When the src attribute of the iframe's set, foo.html's nested browsing context is navigated instead of the top-level browsing context. See https://html.spec.whatwg.org/#otherwise-steps-for-iframe-or-frame-elements step 4. That is, the request passed to fetch will use the iframe's settings object as the client.

I'm a bit concerned about introducing initialClientId. It seems it goes too much complex for corner cases. Coming back to the definition we originally thought:

* client: request's client
* reserved client: literally reserved client for main resource
* target client: to-be-replaced client

For normal case (i.e. navigate from non-initial document), they seem to be apparent.

For replacement case, I think they should be:

* client: about:blank
* reserved client: reserved environment for frame.html request (this is different from the f2f decision)
* target client: null (or event about blank?)

As this is the case where the existing global (and the environment settings object) are legitimately reused, the reserved client being removed and the client being the final client for the resource sounds good to me.

FYI, https://github.com/whatwg/html/pull/2080 is the related PR that I should revisit now.

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

Received on Monday, 19 June 2017 10:38:21 UTC