Files
jquery/src/deprecated.js
Shashanka Nataraj c18d608537 Core: Deprecate jQuery.isWindow
Fixes gh-3629
Close gh-3702
2017-07-10 12:00:27 -04:00

43 lines
858 B
JavaScript

define( [
"./core",
"./core/nodeName",
"./var/isWindow"
], function( jQuery, nodeName, isWindow ) {
"use strict";
jQuery.fn.extend( {
bind: function( types, data, fn ) {
return this.on( types, null, data, fn );
},
unbind: function( types, fn ) {
return this.off( types, null, fn );
},
delegate: function( selector, types, data, fn ) {
return this.on( types, selector, data, fn );
},
undelegate: function( selector, types, fn ) {
// ( namespace ) or ( selector, types [, fn] )
return arguments.length === 1 ?
this.off( selector, "**" ) :
this.off( types, selector || "**", fn );
}
} );
jQuery.holdReady = function( hold ) {
if ( hold ) {
jQuery.readyWait++;
} else {
jQuery.ready( true );
}
};
jQuery.isArray = Array.isArray;
jQuery.parseJSON = JSON.parse;
jQuery.nodeName = nodeName;
jQuery.isWindow = isWindow;
} );