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.
-
Show this thread
-
Replying to @really_bz @bz_moz
do you mean a script that injects content into the iframe or just adding an iframe with a src?
1 reply 0 retweets 0 likes -
Replying to @bluesmoon
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.
1 reply 0 retweets 0 likes -
Replying to @really_bz @bz_moz
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/ …
1 reply 0 retweets 0 likes -
Replying to @bluesmoon
I'm talking about the load event of the iframe's parent, not the iframe itself.
2 replies 0 retweets 0 likes -
Replying to @really_bz @bluesmoon
As in, we have a situation where we start a subresource load in a page before that page's load event has fired, and the load event fires before the subresource is done loading.
1 reply 0 retweets 0 likes -
Interesting. Feel free to file a bug in the Chromium tracker and send me the bug id, I'll make sure it gets triaged appropriately.
2 replies 0 retweets 0 likes
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.