From 3d732cca6b5076a9d13eee98e2b075b37384cd91 Mon Sep 17 00:00:00 2001 From: Jason Bedard Date: Tue, 12 Dec 2017 22:43:30 -0800 Subject: Core: deprecate jQuery.isFunction Fixes gh-3609 --- src/attributes/val.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/attributes/val.js') diff --git a/src/attributes/val.js b/src/attributes/val.js index d764ec6d1..c719b34b3 100644 --- a/src/attributes/val.js +++ b/src/attributes/val.js @@ -3,9 +3,10 @@ define( [ "../core/stripAndCollapse", "./support", "../core/nodeName", + "../var/isFunction", "../core/init" -], function( jQuery, stripAndCollapse, support, nodeName ) { +], function( jQuery, stripAndCollapse, support, nodeName, isFunction ) { "use strict"; @@ -13,7 +14,7 @@ var rreturn = /\r/g; jQuery.fn.extend( { val: function( value ) { - var hooks, ret, isFunction, + var hooks, ret, valueIsFunction, elem = this[ 0 ]; if ( !arguments.length ) { @@ -42,7 +43,7 @@ jQuery.fn.extend( { return; } - isFunction = jQuery.isFunction( value ); + valueIsFunction = isFunction( value ); return this.each( function( i ) { var val; @@ -51,7 +52,7 @@ jQuery.fn.extend( { return; } - if ( isFunction ) { + if ( valueIsFunction ) { val = value.call( this, i, jQuery( this ).val() ); } else { val = value; -- cgit v1.2.3