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

Re: [whatwg] Avoiding synchronous iframe load

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 25 Oct 2013 20:53:48 -0400
Message-ID: <526B129C.4080704@mit.edu>
To: Ian Hickson <ian@hixie.ch>
Cc: whatwg <whatwg@lists.whatwg.org>, Elliott Sprehn <esprehn@chromium.org>, Ryosuke Niwa <rniwa@apple.com>
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.


> 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...

Received on Saturday, 26 October 2013 00:54:15 UTC

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