aboutsummaryrefslogtreecommitdiffstats
path: root/src/deferred.js
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-08-15 14:15:49 -0400
committerTimmy Willison <timmywillisn@gmail.com>2013-08-15 15:49:49 -0400
commit217cbb7109b7a5bbacd3170e90607ca5972fc1cd (patch)
tree4deb7b42f248f7ea73398dc329584899b5573413 /src/deferred.js
parent144837afdfab98d6a9f753bc4ccc1feede410101 (diff)
downloadjquery-217cbb7109b7a5bbacd3170e90607ca5972fc1cd.tar.gz
jquery-217cbb7109b7a5bbacd3170e90607ca5972fc1cd.zip
AMD-ify jQuery sourcegit s! Woo! Fixes #14113, #14163.
Conflicts: Gruntfile.js README.md src/ajax.js src/ajax/xhr.js src/attributes.js src/core.js src/css.js src/data.js src/effects.js src/event.js src/manipulation.js src/offset.js src/selector-native.js src/traversing.js test/unit/core.js test/unit/data.js
Diffstat (limited to 'src/deferred.js')
-rw-r--r--src/deferred.js11
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();
}
});
+});