Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Ajax: Deprecate AJAX event aliases, inline event/alias into deprecated
A new `src/deprecated` directory makes it possible to exclude some deprecated APIs from a custom build when their respective "parent" module is excluded without keeping that module outside of the `src/deprecated` directory or the `src/deprecated.js` file. Closes gh-4572 (cherry picked from 23d5392)
- Loading branch information
Showing
7 changed files
with
56 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
define( [ | ||
"../core", | ||
|
||
"../event", | ||
"../event/trigger" | ||
], function( jQuery ) { | ||
|
||
"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 ); | ||
}, | ||
|
||
hover: function( fnOver, fnOut ) { | ||
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); | ||
} | ||
} ); | ||
|
||
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + | ||
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + | ||
"change select submit keydown keypress keyup contextmenu" ).split( " " ), | ||
function( _i, name ) { | ||
|
||
// Handle event binding | ||
jQuery.fn[ name ] = function( data, fn ) { | ||
return arguments.length > 0 ? | ||
this.on( name, null, data, fn ) : | ||
this.trigger( name ); | ||
}; | ||
} ); | ||
|
||
} ); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters