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;
}
if ( jQuery.isFunction( Function.prototype.bind ) ) {
if ( jQuery.support.nativeBind ) {
// Native bind
args = slice.call( arguments, 1 );
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)
optSelected: opt.selected,
// Test for native Function#bind.
nativeBind: jQuery.isFunction( Function.prototype.bind ),
// Will be defined later
deleteExpando: true,
optDisabled: false,