[whatwg] Sublties with seamless navigation

Ian Hickson ian at hixie.ch
Mon Jul 9 16:26:25 PDT 2012


On Tue, 10 Apr 2012, Adam Barth wrote:
>
> Consider the following requirement for seamless iframes:
> 
> http://www.whatwg.org/specs/web-apps/current-work/#seamlessLinks
> 
> [[
> If the source browsing context is the same as the browsing context
> being navigated, and this browsing context has its seamless browsing
> context flag set, and the browsing context being navigated was not
> chosen using an explicit self-navigation override, then find the
> nearest ancestor browsing context that does not have its seamless
> browsing context flag set, and continue these steps as if that
> browsing context was the one that was going to be navigated instead.
> ]]
> 
> However, that requirement seems to be a bit too agressive.  For example, 
> setting the "src" attribute on the iframe element loads the document in 
> the iframe using the Navigate keyword.

Uh, yeah. Oops. Fixed.


> Should we be more explicit in 
> <http://www.whatwg.org/specs/web-apps/current-work/#dom-iframe-src> 
> about what the source browsing context is?

The more relevant part is:

   http://www.whatwg.org/specs/web-apps/current-work/#process-the-iframe-attributes

It seems pretty explicit, I don't know how to make it more so. :-)

I fixed it by making the navigation in that algorithm always an explicit 
self-navigation override.


> Is it always the browsing context that contains the <iframe> element, or 
> does it depend on which script is manipulating the src attribute (e.g., 
> via the DOM)?

Always the iframe's nested browsing context.


> Should setting the src attribute use an explicit self-navigation 
> override?

Yes.


> The easiest solution is probably to specify the source browsing context 
> explicitly, as we do for window.open 
> <http://www.whatwg.org/specs/web-apps/current-work/#dom-open> and 
> location.href 
> <http://www.whatwg.org/specs/web-apps/current-work/#dom-location-href>.

It's already set explicitly, but it's set to its own nested browsing 
context, which is where the problem starts.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list