jquery/jquery — pull request #736 by mikesherov (2012-04-13 17:49:26+00:00)
Title: Fixes #10067 Introducing.... jQuery.quickReady

So, if you are using a non-standards browser (IE<9), or if you asynchronously load jQuery, the current behavior is to fire jQuery.ready after all sub-resources load. This means if you have an IFRAME that takes a long time to load, you're prioritizing that content to load FIRST before your jQuery.ready code fires!

Now, some people unfortunately use jQuery to manipulate contents of IFRAMES on their pages, and wait for .ready() to fire to do so. So, unfortunately, we need to continue supporting that functionality, while also allowing devs to prioritize their own content over iframes (especially considering the prevelance of IFRAMES these days).

Introducing, jQuery.quickReady! Set this flag to true before creating your .ready() code, but after jQuery has loaded, and jQuery will now fire ready when the DOM is ready to be manipulated, but before all subresources have loaded.

Example uses are in the unit tests. In a future release, we can change the default to true if we've given enough time for people to adapt.There are some interesting edge cases, please read the unit tests as they account for all of the ones I was able to discover.

Also, I generalized some more of the testing framework to enable the tests here. They all work.