@@ -96,13 +96,9 @@ jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
96
96
function ( _i , name ) {
97
97
98
98
// Handle event binding
99
- migratePatchAndWarnFunc ( jQuery . fn , name , function ( data , fn ) {
100
- return arguments . length > 0 ?
101
- this . on ( name , null , data , fn ) :
102
- this . trigger ( name ) ;
103
- } ,
104
- "shorthand-deprecated-v3" ,
105
- "jQuery.fn." + name + "() event shorthand is deprecated" ) ;
99
+ migratePatchAndWarnFunc ( jQuery . fn , name , jQuery . fn [ name ] , "shorthand-deprecated-v3" ,
100
+ "DEPRECATED: jQuery.fn." + name + "() event shorthand" ) ;
101
+
106
102
} ) ;
107
103
108
104
// Trigger "ready" event only once, on document ready
@@ -118,20 +114,15 @@ jQuery.event.special.ready = {
118
114
}
119
115
} ;
120
116
121
- migratePatchAndWarnFunc ( jQuery . fn , "bind" , function ( types , data , fn ) {
122
- return this . on ( types , null , data , fn ) ;
123
- } , "pre-on-methods" , "jQuery.fn.bind() is deprecated" ) ;
124
- migratePatchAndWarnFunc ( jQuery . fn , "unbind" , function ( types , fn ) {
125
- return this . off ( types , null , fn ) ;
126
- } , "pre-on-methods" , "jQuery.fn.unbind() is deprecated" ) ;
127
- migratePatchAndWarnFunc ( jQuery . fn , "delegate" , function ( selector , types , data , fn ) {
128
- return this . on ( types , selector , data , fn ) ;
129
- } , "pre-on-methods" , "jQuery.fn.delegate() is deprecated" ) ;
130
- migratePatchAndWarnFunc ( jQuery . fn , "undelegate" , function ( selector , types , fn ) {
131
- return arguments . length === 1 ?
132
- this . off ( selector , "**" ) :
133
- this . off ( types , selector || "**" , fn ) ;
134
- } , "pre-on-methods" , "jQuery.fn.undelegate() is deprecated" ) ;
117
+ migratePatchAndWarnFunc ( jQuery . fn , "bind" , jQuery . fn . bind ,
118
+ "pre-on-methods" , "jQuery.fn.bind() is deprecated" ) ;
119
+ migratePatchAndWarnFunc ( jQuery . fn , "unbind" , jQuery . fn . unbind ,
120
+ "pre-on-methods" , "jQuery.fn.unbind() is deprecated" ) ;
121
+ migratePatchAndWarnFunc ( jQuery . fn , "delegate" , jQuery . fn . delegate ,
122
+ "pre-on-methods" , "jQuery.fn.delegate() is deprecated" ) ;
123
+ migratePatchAndWarnFunc ( jQuery . fn , "undelegate" , jQuery . fn . undelegate ,
124
+ "pre-on-methods" , "jQuery.fn.undelegate() is deprecated" ) ;
125
+
135
126
migratePatchAndWarnFunc ( jQuery . fn , "hover" , function ( fnOver , fnOut ) {
136
127
return this . on ( "mouseenter" , fnOver ) . on ( "mouseleave" , fnOut || fnOver ) ;
137
128
} , "pre-on-methods" , "jQuery.fn.hover() is deprecated" ) ;
0 commit comments