Perf. improvement based on fearphage's suggestion (direct vs call vs apply).

This commit is contained in:
Gianni Chiappetta 2010-12-18 19:17:37 -05:00
parent 1ebb5ab3e1
commit 6bc9fc7c10

View File

@ -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 );