[whatwg] Avoiding synchronous iframe load

Chase Moskal chasemoskal at gmail.com
Sun Jan 19 15:49:11 PST 2014


On Sun, Jan 19, 2014 at 6:20 AM, Boris Zbarsky <bzbarsky at mit.edu> wrote:

> On 1/18/14 11:34 PM, Ryosuke Niwa wrote:
>
>> 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?


I just tested it:

IE11
 +
(IE11 emulation 'document modes': IE 5,7,8,9,10,Edge)

all log 1, followed by 2.

  //Chase.



More information about the whatwg mailing list