Closed
Description
Hi, I am hoping to get some clarification around why the following code is in the migrate plugin. Looking at the upgrade guide, I do not see any mention of any of these methods being deprecated. Likewise, they are nor marked as deprecated in the docs.
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 ) {
migrateWarn( "jQuery.fn." + name + "() event shorthand is deprecated" );
return arguments.length > 0 ?
this.on( name, null, data, fn ) :
this.trigger( name );
};
} );
Metadata
Metadata
Assignees
Labels
No labels