Commit e270d804 authored by jeresig's avatar jeresig

Delay the result of the readyState check to give scripts the opportunity to...

Delay the result of the readyState check to give scripts the opportunity to delay ready, as described by @jrburke in 747ba7de.
parent 2f603359
...@@ -429,7 +429,8 @@ jQuery.extend({ ...@@ -429,7 +429,8 @@ jQuery.extend({
// Catch cases where $(document).ready() is called after the // Catch cases where $(document).ready() is called after the
// browser event has already occurred. // browser event has already occurred.
if ( document.readyState === "complete" ) { if ( document.readyState === "complete" ) {
return jQuery.ready(); // Handle it asynchronously to allow scripts the opportunity to delay ready
return setTimeout( jQuery.ready, 13 );
} }
// Mozilla, Opera and webkit nightlies currently support this event // Mozilla, Opera and webkit nightlies currently support this event
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment