Permalink
Browse files

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

As per the suggestion by ajpiano: gf3@9f8cd6c#commitcomment-218658
  • Loading branch information...
gf3 committed Dec 15, 2010
1 parent 9f8cd6c commit 5b1b57850cfd4c92a4f9231581dff7faac489566
Showing with 4 additions and 1 deletion.
  1. +1 −1 src/core.js
  2. +3 −0 src/support.js
@@ -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 );
@@ -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,

0 comments on commit 5b1b578

Please sign in to comment.