Permalink
Browse files

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

As per the suggestion by ajpiano: 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
View
@@ -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
@@ -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.

This comment has been minimized.

Show comment
Hide comment
@csnover

csnover Dec 16, 2010

Could you mention which browsers this currently fails in? That way, we know later on when we’re dropping old browsers which areas of code we can get rid of by removing the alternate code paths.

@csnover

csnover Dec 16, 2010

Could you mention which browsers this currently fails in? That way, we know later on when we’re dropping old browsers which areas of code we can get rid of by removing the alternate code paths.

This comment has been minimized.

Show comment
Hide comment
@gf3

gf3 Dec 16, 2010

Owner

Added in: 1ebb5ab.

@gf3

gf3 Dec 16, 2010

Owner

Added in: 1ebb5ab.

nativeBind: jQuery.isFunction( Function.prototype.bind ),
// Will be defined later
deleteExpando: true,
optDisabled: false,

0 comments on commit 5b1b578

Please sign in to comment.