W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2013

Re: [whatwg] scrdoc and session history don't play along in the spec

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 12 Jul 2013 19:39:41 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@MIT.EDU>, Adam Barth <w3c@adambarth.com>
Message-ID: <alpine.DEB.2.00.1307121914050.15729@ps20323.dreamhostps.com>
Cc: whatwg <whatwg@lists.whatwg.org>
On Fri, 5 Apr 2013, Boris Zbarsky wrote:
> The session history algorithm in the spec navigates to urls.

That wasn't the intent. I've tried to clarify it.

> As far as I can tell, on the face of it, this means that this testcase:
>   <iframe name="x" srcdoc="aaa"></iframe>
>   <a target="x" href="http://web.mit.edu">
>     Click me, then later hit back
>   </a>
> should fail to go back.

It should load the original resource.

> Again, as far as I can tell; actually telling anything for sure about 
> the navigation/shistory part of the spec is impossible.  :(

You know, it's disheartening to work on something and have you continually 
insult it like this. Please stick to positive feedback, which you are 
quite good at providing, and avoid the non-constructive negative commentary.


On Sat, 22 Jun 2013, Adam Barth wrote:
> One tricky case here is what happens if you modify the srcdoc attribute:
> <iframe id="foo" srcdoc="aaa"></iframe>
> <script>
> [...] // Wait for the iframe to finish loading.
> document.getElementById("foo").srcdoc = "bbb";
> [...] // Wait for the iframe to finish loading.
> document.getElementById("foo").contentWindow.document.body.innerHTML = "ccc";
> </script>
> What happens if you click the back button now?  I believe that in WebKit 
> and Blink, you'll get "bbb".  That's because we navigated back in the 
> history to "about:srcdoc", which then looked at the srcdoc property and 
> saw "bbb" even though the srcdoc property had "aaa" when that history 
> entry was created.

If I'm not mistaken, the spec requires it to be "aaa", since that's what 
resource was loaded for the first session history item.

I don't see anything in the spec that allows "bbb" to be shown.

On Sun, 23 Jun 2013, Adam Barth wrote:
> I guess it depends on what you mean by "rely".  We just treat the 
> about:srcdoc URL as something that, when fetched, retrieves the value 
> currently stored in the srcdoc attribute.

That doesn't seem defensible per the spec. In fact, the spec explicitly 
says that about:srcdoc is "unresolvable".

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 12 July 2013 19:40:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:03 UTC