Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Core: Use window.setTimeout & friends instead of global equivalents
- Loading branch information
|
|
@@ -14,10 +14,6 @@ |
|
|
|
|
|
"globals": { |
|
|
"window": true, |
|
|
"setTimeout": true, |
|
|
"clearTimeout": true, |
|
|
"setInterval": true, |
|
|
"clearInterval": true, |
|
|
|
|
|
"jQuery": true, |
|
|
"define": true, |
|
|
|
|
|
@@ -2,14 +2,17 @@ define([ |
|
|
"./core", |
|
|
"./var/document", |
|
|
"./var/rnotwhite", |
|
|
"./var/setTimeout", |
|
|
"./var/clearTimeout", |
|
|
"./ajax/var/location", |
|
|
"./ajax/var/nonce", |
|
|
"./ajax/var/rquery", |
|
|
"./core/init", |
|
|
"./ajax/parseJSON", |
|
|
"./ajax/parseXML", |
|
|
"./deferred" |
|
|
], function( jQuery, document, rnotwhite, location, nonce, rquery ) { |
|
|
], function( jQuery, document, rnotwhite, setTimeout, clearTimeout, |
|
|
location, nonce, rquery ) { |
|
|
|
|
|
var |
|
|
rhash = /#.*$/, |
|
|
|
|
|
@@ -1,8 +1,9 @@ |
|
|
define([ |
|
|
"../core", |
|
|
"../var/document", |
|
|
"../var/setTimeout", |
|
|
"../deferred" |
|
|
], function( jQuery, document ) { |
|
|
], function( jQuery, document, setTimeout ) { |
|
|
|
|
|
// The deferred used on DOM ready |
|
|
var readyList; |
|
|
|
|
|
@@ -1,8 +1,9 @@ |
|
|
define([ |
|
|
"./core", |
|
|
"./var/slice", |
|
|
"./var/setTimeout", |
|
|
"./callbacks" |
|
|
], function( jQuery, slice ) { |
|
|
], function( jQuery, slice, setTimeout ) { |
|
|
|
|
|
function Identity( v ) { |
|
|
return v; |
|
|
|
|
|
@@ -2,6 +2,9 @@ define([ |
|
|
"./core", |
|
|
"./var/document", |
|
|
"./var/rcssNum", |
|
|
"./var/setInterval", |
|
|
"./var/clearInterval", |
|
|
"./var/setTimeout", |
|
|
"./css/var/cssExpand", |
|
|
"./css/var/isHidden", |
|
|
"./css/var/swap", |
|
|
@@ -16,7 +19,8 @@ define([ |
|
|
"./manipulation", |
|
|
"./css", |
|
|
"./effects/Tween" |
|
|
], function( jQuery, document, rcssNum, cssExpand, isHidden, swap, adjustCSS, dataPriv, showHide ) { |
|
|
], function( jQuery, document, rcssNum, setInterval, clearInterval, setTimeout, |
|
|
cssExpand, isHidden, swap, adjustCSS, dataPriv, showHide ) { |
|
|
|
|
|
var |
|
|
fxNow, timerId, |
|
|
|
|
|
@@ -1,8 +1,10 @@ |
|
|
define([ |
|
|
"../core", |
|
|
"../var/setTimeout", |
|
|
"../var/clearTimeout", |
|
|
"../queue", |
|
|
"../effects" // Delay is optional because of this dependency |
|
|
], function( jQuery ) { |
|
|
], function( jQuery, setTimeout, clearTimeout ) { |
|
|
|
|
|
// 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/ |
|
|
|
|
|
@@ -0,0 +1,3 @@ |
|
|
define(function() { |
|
|
return window.clearInterval; |
|
|
}); |
|
|
@@ -0,0 +1,3 @@ |
|
|
define(function() { |
|
|
return window.clearTimeout; |
|
|
}); |
|
|
@@ -0,0 +1,3 @@ |
|
|
define(function() { |
|
|
return window.setInterval; |
|
|
}); |
|
|
@@ -0,0 +1,3 @@ |
|
|
define(function() { |
|
|
return window.setTimeout; |
|
|
}); |