[whatwg] Avoiding synchronous iframe load

Boris Zbarsky bzbarsky at MIT.EDU
Fri Oct 25 17:53:48 PDT 2013


On 10/25/13 6:47 PM, Ian Hickson wrote:
> Dunno about restructuring it exactly, but I've done the next best thing,
> which is to add ample non-normative text explaining it.

Yep.  The new text helps a lot, thanks!

> Well, at the end of the day it's "just" a string comparison.

Sort of.  _Changing_ the src attr to about:blank for an iframe that is 
already in the DOM should presumably always do a navigation to the new 
document.  I guess the string compare would be in the code that runs 
when an iframe is inserted into the DOM; that might work.

> The question is whether it matters, and if doing so makes sense.

Agreed.

> The advantage of the current model is that it's nice and easy
> to understand: if there's a src="" attribute, then it gets loaded, and
> therefore it replaces the document that was there before it (though the
> Window object is maintained if it's same-origin), but if there's no
> attribute, nothing happens except the fake 'load' event being fired.

I'd be interested in what consumers of this API think here...

-Boris



More information about the whatwg mailing list