Add a quick test to $.support for native bind.

As per the suggestion by ajpiano: 9f8cd6c499 (commitcomment-218658)
This commit is contained in:
Gianni Chiappetta 2010-12-15 18:31:10 -05:00
parent 9f8cd6c499
commit 5b1b57850c
2 changed files with 4 additions and 1 deletions

View File

@ -751,7 +751,7 @@ jQuery.extend({
return undefined; return undefined;
} }
if ( jQuery.isFunction( Function.prototype.bind ) ) { if ( jQuery.support.nativeBind ) {
// Native bind // Native bind
args = slice.call( arguments, 1 ); args = slice.call( arguments, 1 );
proxy = Function.prototype.bind.apply( fn, args ); proxy = Function.prototype.bind.apply( fn, args );

View File

@ -60,6 +60,9 @@
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup) // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
optSelected: opt.selected, optSelected: opt.selected,
// Test for native Function#bind.
nativeBind: jQuery.isFunction( Function.prototype.bind ),
// Will be defined later // Will be defined later
deleteExpando: true, deleteExpando: true,
optDisabled: false, optDisabled: false,