UNCONFIRMED70128
onload handlers fire in incorrect order when iframes are present
https://bugs.webkit.org/show_bug.cgi?id=70128
Summary onload handlers fire in incorrect order when iframes are present
vitaliyl
Reported 2011-10-14 11:56:40 PDT
Created attachment 111041 [details] minimal case reproducing the bug Given three onload handlers: for the top-level document, for the iframe element in that was added to the DOM in inline Javascript block, and for the document inside the iframe, the onload handlers sometimes fire in a wrong order. In particular, the top-level document onload handler fires first, followed by the iframe document onload handler, followed by the iframe element onload handler. I don't know what is the standard-prescribed behavior, but both Mozilla/Firefox and recent versions of IE fire off the handlers in a more sane order: iframe document onload handler followed by the iframe element onload handler followed by the top-level document onload handler. Please see the minimal test case attached. I also noticed in my testing that presence of other DOM elements, such as images, in the top-level document affects the ordering, sometimes causing it to match Firefox and IE behavior, but only sometimes. I was not able to narrow down exactly what causes the behavior to change. I've initially found this bug in dev-channel Chrome, but I was able to reproduce it in stable Safari builds as well.
Attachments
minimal case reproducing the bug (387 bytes, application/octet-stream)
2011-10-14 11:56 PDT, vitaliyl
no flags
Note You need to log in before you can comment on or make changes to this bug.