Fix #10417. setTimeout w/o 2nd arg is jQuery.later! Close gh-1065.

This commit is contained in:
Oleg
2012-12-10 12:00:12 +04:00
committed by Dave Methvin
parent cef044d82e
commit d41b983259
3 changed files with 4 additions and 4 deletions

View File

@@ -190,7 +190,7 @@ if ( xhrSupported ) {
} else if ( xhr.readyState === 4 ) {
// (IE6 & IE7) if it's in cache and has been
// retrieved directly we need to fire the callback
setTimeout( callback, 0 );
setTimeout( callback );
} else {
handle = ++xhrId;
if ( xhrOnUnloadAbort ) {

View File

@@ -386,7 +386,7 @@ jQuery.extend({
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if ( !document.body ) {
return setTimeout( jQuery.ready, 1 );
return setTimeout( jQuery.ready );
}
// Remember that the DOM is ready
@@ -858,7 +858,7 @@ jQuery.ready.promise = function( obj ) {
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
if ( document.readyState === "complete" ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready
setTimeout( jQuery.ready, 1 );
setTimeout( jQuery.ready );
// Standards-based browsers support DOMContentLoaded
} else if ( document.addEventListener ) {

2
src/effects.js vendored
View File

@@ -51,7 +51,7 @@ var fxNow, timerId,
function createFxNow() {
setTimeout(function() {
fxNow = undefined;
}, 0 );
});
return ( fxNow = jQuery.now() );
}