diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2013-08-15 14:15:49 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-08-15 14:15:49 -0400 |
commit | 6318ae6ab90d4b450dfadf32ab95fe52ed6331cb (patch) | |
tree | 50b247fed8569e909e380b281e9145bd1458a39e /src/deferred.js | |
parent | 7627b8b6d9ef6e57dbd20a55b946bd1991c1223e (diff) | |
download | jquery-6318ae6ab90d4b450dfadf32ab95fe52ed6331cb.tar.gz jquery-6318ae6ab90d4b450dfadf32ab95fe52ed6331cb.zip |
AMD-ify jQuery sourcegit s! Woo! Fixes #14113, #14163.
Diffstat (limited to 'src/deferred.js')
-rw-r--r-- | src/deferred.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/deferred.js b/src/deferred.js index 3c0edc038..7ba164a8f 100644 --- a/src/deferred.js +++ b/src/deferred.js @@ -1,3 +1,9 @@ +define([ + "./core", + "./var/slice", + "./callbacks" +], function( jQuery, slice ) { + jQuery.extend({ Deferred: function( func ) { @@ -89,7 +95,7 @@ jQuery.extend({ // Deferred helper when: function( subordinate /* , ..., subordinateN */ ) { var i = 0, - resolveValues = core_slice.call( arguments ), + resolveValues = slice.call( arguments ), length = resolveValues.length, // the count of uncompleted subordinates @@ -102,7 +108,7 @@ jQuery.extend({ updateFunc = function( i, contexts, values ) { return function( value ) { contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if( values === progressValues ) { deferred.notifyWith( contexts, values ); } else if ( !( --remaining ) ) { @@ -138,3 +144,4 @@ jQuery.extend({ return deferred.promise(); } }); +}); |