diff options
author | Jason Bedard <jason+github@jbedard.ca> | 2017-12-12 22:43:30 -0800 |
---|---|---|
committer | Jason Bedard <jason+github@jbedard.ca> | 2018-01-15 09:26:19 -0800 |
commit | 3d732cca6b5076a9d13eee98e2b075b37384cd91 (patch) | |
tree | 7ad2375d276c212e7d252554b3f87e5b0b3bec5e /src/wrap.js | |
parent | 6c38ebbd47c6b0fa654733819bd5ae36c1ac6c48 (diff) | |
download | jquery-3d732cca6b5076a9d13eee98e2b075b37384cd91.tar.gz jquery-3d732cca6b5076a9d13eee98e2b075b37384cd91.zip |
Core: deprecate jQuery.isFunction
Fixes gh-3609
Diffstat (limited to 'src/wrap.js')
-rw-r--r-- | src/wrap.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/wrap.js b/src/wrap.js index 88b9bb56d..41b716f9f 100644 --- a/src/wrap.js +++ b/src/wrap.js @@ -1,9 +1,10 @@ define( [ "./core", + "./var/isFunction", "./core/init", "./manipulation", // clone "./traversing" // parent, contents -], function( jQuery ) { +], function( jQuery, isFunction ) { "use strict"; @@ -12,7 +13,7 @@ jQuery.fn.extend( { var wrap; if ( this[ 0 ] ) { - if ( jQuery.isFunction( html ) ) { + if ( isFunction( html ) ) { html = html.call( this[ 0 ] ); } @@ -38,7 +39,7 @@ jQuery.fn.extend( { }, wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { + if ( isFunction( html ) ) { return this.each( function( i ) { jQuery( this ).wrapInner( html.call( this, i ) ); } ); @@ -58,10 +59,10 @@ jQuery.fn.extend( { }, wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); + var htmlIsFunction = isFunction( html ); return this.each( function( i ) { - jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); } ); }, |