mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Perf. improvement based on fearphage's suggestion (direct vs call vs apply).
This commit is contained in:
parent
1ebb5ab3e1
commit
6bc9fc7c10
@ -754,7 +754,11 @@ jQuery.extend({
|
||||
if ( jQuery.support.nativeBind ) {
|
||||
// Native bind
|
||||
args = slice.call( arguments, 1 );
|
||||
if ( args.length ) {
|
||||
proxy = Function.prototype.bind.apply( fn, args );
|
||||
} else {
|
||||
proxy = fn.bind( context );
|
||||
}
|
||||
} else {
|
||||
// Simulated bind
|
||||
args = slice.call( arguments, 2 );
|
||||
|
Loading…
Reference in New Issue
Block a user