mirror of
https://github.com/jquery/jquery.git
synced 2026-02-04 08:25:09 -05:00
@@ -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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user