- From: Ben Kelly <notifications@github.com>
- Date: Thu, 11 May 2017 08:04:04 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/issues/1091/300817825@github.com>
I read through the meeting minutes and it seems we did not really come to conclusion here. I need to do something for our implementation, though, so I'd like to make a sketch proposal we can discuss at the next meeting. Hopefully I will have something implemented behind a pref so we can try it out. My idea is to be more explicit about the replacement case. Instead of putting the about:blank client ID in the `FetchEvent.reservedClientId` we expose it in a new `FetchEvent.initialClientId`. I took the term "initial" here from the "initial about:blank document" used in the HTML spec. I also considered `replacementClientId`, but I think that's confusing because in other navigations the `targetClientId` is usually being replaced by the reserved client. When there is an initial about:blank we are actually *not* replacing the client, but reusing it. The document is getting replaced (but a client is not the document). So for this code snippet: ``` // foo.html let f = document.createElement('iframe'); document.body.appendChild(f); f.contentWindow.someGlobalStatus = 'yuck'; f.src = 'frame.html'; ``` The FetchEvent would have: * clientId = foo.html window * reservedClientId = null * initialClientId = about:blank iframe window * targetClientId = about:blank iframe window -- 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-300817825
Received on Thursday, 11 May 2017 15:04:40 UTC