From d41b983259042d3a07ae785c09f71c68d9ce7c3f Mon Sep 17 00:00:00 2001 From: Oleg Date: Mon, 10 Dec 2012 12:00:12 +0400 Subject: [PATCH] Fix #10417. setTimeout w/o 2nd arg is jQuery.later! Close gh-1065. --- src/ajax/xhr.js | 2 +- src/core.js | 4 ++-- src/effects.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index d00e1f125..3c1fde374 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -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 ) { diff --git a/src/core.js b/src/core.js index 5db9b5e82..d666567f2 100644 --- a/src/core.js +++ b/src/core.js @@ -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 ) { diff --git a/src/effects.js b/src/effects.js index 68fc60101..da680f0b6 100644 --- a/src/effects.js +++ b/src/effects.js @@ -51,7 +51,7 @@ var fxNow, timerId, function createFxNow() { setTimeout(function() { fxNow = undefined; - }, 0 ); + }); return ( fxNow = jQuery.now() ); } -- 2.39.5