diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2015-06-17 12:55:59 +0200 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2015-06-17 12:59:01 +0200 |
commit | 842958e7aecd0d75a7ee9e2aaec83457701aa2f3 (patch) | |
tree | d9adb6f9644eee28f71ea233b18f2d60559c9ebc /src/queue | |
parent | 219c7494938a10b985b7827990bc419e41585b10 (diff) | |
download | jquery-842958e7aecd0d75a7ee9e2aaec83457701aa2f3.tar.gz jquery-842958e7aecd0d75a7ee9e2aaec83457701aa2f3.zip |
Core: Switch from modules to just window.setTimeout etc.
Using modules for window.setTimeout etc. made those functions cached and
disabled Sinon mocking, making effects tests fail. Just writing
window.setTimeout directly is smaller anyway.
Diffstat (limited to 'src/queue')
-rw-r--r-- | src/queue/delay.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/queue/delay.js b/src/queue/delay.js index d2aa7e409..93abd0bf2 100644 --- a/src/queue/delay.js +++ b/src/queue/delay.js @@ -1,10 +1,8 @@ define([ "../core", - "../var/setTimeout", - "../var/clearTimeout", "../queue", "../effects" // Delay is optional because of this dependency -], function( jQuery, setTimeout, clearTimeout ) { +], function( jQuery ) { // Based off of the plugin by Clint Helfers, with permission. // http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ @@ -13,9 +11,9 @@ jQuery.fn.delay = function( time, type ) { type = type || "fx"; return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); + var timeout = window.setTimeout( next, time ); hooks.stop = function() { - clearTimeout( timeout ); + window.clearTimeout( timeout ); }; }); }; |