W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2014

Re: [whatwg] Avoiding synchronous iframe load

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 19 Jan 2014 09:20:50 -0500
Message-ID: <52DBDF42.8000604@mit.edu>
To: Ryosuke Niwa <rniwa@apple.com>, Ian Hickson <ian@hixie.ch>
Cc: whatwg <whatwg@lists.whatwg.org>, Elliott Sprehn <esprehn@chromium.org>
On 1/18/14 11:34 PM, Ryosuke Niwa wrote:
> Am I correct in assuming that load event never fires for this about:blank page since it’s “both ready for post-load tasks and completely loaded immediately"?

I would think not, since it's a web compat requirement to fire onload 
for about:blank iframes and the spec took that into account _somewhere_ 
last I checked...

> If so, that doesn’t match the existing behaviors of major browser engines.  For example, Firefox logs 1 then 2 in the following example whereas Chrome and Safari log 2 and then 1:
> var iframe = document.createElement('iframe');
> iframe.onload = function () { console.log('2'); }
> document.body.appendChild(iframe);
> console.log('1’);

Just curious: What does IE do?

-Boris
Received on Sunday, 19 January 2014 14:21:20 UTC

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