Commit 5b1b5785 authored by Gianni Chiappetta's avatar Gianni Chiappetta

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

As per the suggestion by ajpiano: https://github.com/gf3/jquery/commit/9f8cd6c499844451468257140e71f611abb3a040#commitcomment-218658
parent 9f8cd6c4
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment