Re: [whatwg] Resource loading in browsing context-less Documents

On Wed, 19 Dec 2012, Boris Zbarsky wrote:
> On 12/18/12 3:25 PM, Ian Hickson wrote:
> > Looking at the spec and at browsers more carefully, it seems that this 
> > is actually per spec (i.e. the spec says to follow the link).
> 
> Does it say to do that if the ownerDocument of the <a> has no associated 
> browsing context?  What if it's not the currently active document?

Firefox and IE do not check a checkbox from such a document when .click() 
is invoked on it, while WebKit and Opera do:

   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2032

However, when it comes to an <a> element with a target="_blank" attribute 
in the same situation, only Opera seems to open the link:

   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2033

So I've put in a block on the handling of <a> (and <area>) elements 
specifically, making their activation behaviour nil if their doc doesn't 
have a browsing context (I didn't check if it has to be an active one). A 
similar block was present on <form>'s submission algorithm.

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

Received on Wednesday, 19 December 2012 20:12:05 UTC