mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Remove moot second argument from slice.call()
The zeroes were added to fix http://bugs.jquery.com/ticket/4942 but those browsers are no longer supported.
This commit is contained in:
parent
22ad8723ce
commit
d5ee856a44
@ -200,7 +200,7 @@ jQuery.fn = jQuery.prototype = {
|
||||
},
|
||||
|
||||
toArray: function() {
|
||||
return slice.call( this, 0 );
|
||||
return slice.call( this );
|
||||
},
|
||||
|
||||
// Get the Nth element in the matched element set OR
|
||||
|
@ -102,7 +102,7 @@ jQuery.extend({
|
||||
|
||||
// Deferred helper
|
||||
when: function( firstParam ) {
|
||||
var args = sliceDeferred.call( arguments, 0 ),
|
||||
var args = sliceDeferred.call( arguments ),
|
||||
i = 0,
|
||||
length = args.length,
|
||||
pValues = new Array( length ),
|
||||
@ -114,7 +114,7 @@ jQuery.extend({
|
||||
promise = deferred.promise();
|
||||
function resolveFunc( i ) {
|
||||
return function( value ) {
|
||||
args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
|
||||
args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments ) : value;
|
||||
if ( !( --count ) ) {
|
||||
deferred.resolveWith( deferred, args );
|
||||
}
|
||||
@ -122,7 +122,7 @@ jQuery.extend({
|
||||
}
|
||||
function progressFunc( i ) {
|
||||
return function( value ) {
|
||||
pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
|
||||
pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments ) : value;
|
||||
deferred.notifyWith( promise, pValues );
|
||||
};
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ jQuery.event = {
|
||||
|
||||
var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
|
||||
delegateCount = handlers.delegateCount,
|
||||
args = [].slice.call( arguments, 0 ),
|
||||
args = [].slice.call( arguments ),
|
||||
run_all = !event.exclusive && !event.namespace,
|
||||
special = jQuery.event.special[ event.type ] || {},
|
||||
handlerQueue = [],
|
||||
|
Loading…
Reference in New Issue
Block a user