Today I learned: if you start a load navigation in a subframe from script before your page is done loading, Chrome and Safari will fire your page's onload before that subframe load completes.
I mean adding an iframe with an src. If you set the src first then add, load event waits for that load. If you add, then set src it does not.
-
-
this happens because without an src, the iframe’s onload event fires immediately. We use this hack here:http://www.lognormal.com/blog/2012/12/12/the-script-loader-pattern/ …
-
I'm talking about the load event of the iframe's parent, not the iframe itself.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.