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

Re: [whatwg] Avoiding synchronous iframe load

From: Chase Moskal <chasemoskal@gmail.com>
Date: Sun, 19 Jan 2014 15:49:11 -0800
Message-ID: <CANgy_FbM5YyPfSrHnwFcZWgKnqVMvAS6Et94Te8vFH_cRWs+mw@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: whatwg <whatwg@lists.whatwg.org>, Elliott Sprehn <esprehn@chromium.org>, Ian Hickson <ian@hixie.ch>, Ryosuke Niwa <rniwa@apple.com>
On Sun, Jan 19, 2014 at 6:20 AM, Boris Zbarsky <bzbarsky@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.
Received on Sunday, 19 January 2014 23:49:36 UTC

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