From 5b1b57850cfd4c92a4f9231581dff7faac489566 Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Wed, 15 Dec 2010 18:31:10 -0500 Subject: [PATCH] Add a quick test to $.support for native bind. As per the suggestion by ajpiano: https://github.com/gf3/jquery/commit/9f8cd6c499844451468257140e71f611abb3a040#commitcomment-218658 --- src/core.js | 2 +- src/support.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 74ec4ea0..a6e2a46f 100644 --- a/src/core.js +++ b/src/core.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 ); diff --git a/src/support.js b/src/support.js index 67b41c4a..2913d217 100644 --- a/src/support.js +++ b/src/support.js @@ -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,