Closed dmethvin closed 1 year ago
For the record, this should include .hover()
as well. Noting it here because from the above list and in https://github.com/jquery/jquery/issues/3214, this wasn't explicitly mentioned because hover()
is slightly different from the other on/trigger shortcuts.
From the Dave's list only jQuery.holdReady was deprecated in 3.2.0
; the rest was deprecated in 3.3.0
. Should we morph this ticket or fork another one for 3.3.0
?
There's history in this one, I'll just edit it.
Most of the issues for recent jQueries have been handled in #1160. There are three left. The first is event shorthand methods; this is a bit tricky as the pages also serve as event descriptions. We could go by what @dmethvin suggested & just rewrite those pages, noting the deprecated signatures but generally using the full ones in the description.
The other two:
are not technically deprecated, though, it seems - they were never mentioned in a jQuery release blog post. If we want to deprecate, let's try to do it in jQuery 3.6.0. I'll create dedicated issues for them soon.
It would be good to deprecate both of those for 4.0.
We can easily patch .hover()
in Migrate and anyway I really dislike the behavior in apps that immediately acts as a mouse accidentally swishes over an element with a .hover()
handler. It's a really bad UX and something like .hoverIntent()
is better.
On jQuery.event.which
we can just have it pass through whatever the native browser does. Although its use is discouraged it is still supported and probably will be forever so it won't "break the web".
Event shorthand methods (see below) For the event shorthand methods (.click(), .mousemove(), etc.) I think we should use the current API entries and explain that .click() is now best done as .on("click", fn) or .trigger("click").
From the quoted text above, it is a bit unclear to me whether the intent is to mark these with a deprecation flag for 3.x or not. Would appreciate clarification - i.e. if it is preferred to not use the shorthand notation, that is one thing. If they will be marked as deprecated, then I take that to mean this functionality is expected to be removed in the next major version. Or, if these aliases are to be marked as deprecated, but the intent is to keep the aliases around even in jquery 4, I'd appreciate it if that is made clear as well. We are in the process of doing a jquery migration, and it would be helpful just to know exactly what decision has been made in this regard.
Everything here has now been documented. I've also verified all deprecated APIs from 3.4-3.6 have also been documented. Closing!
Similar to #970 this is the rollup of all the deprecations planned for jQuery 3.2 and 3.3 to be sure we don't miss any. We have tickets in the Core tracker for these and a few have their own docs tickets already.
jQuery 3.2
jQuery 3.3
event.which (see also https://github.com/jquery/jquery/issues/2337)(EDIT by @mgol: this API got undeprecated)For the event shorthand methods (
.click()
,.mousemove()
, etc.) I think we should use the current API entries and explain that.click()
is now best done as.on("click", fn)
or.trigger("click")
. However let's just rewrite the examples and discussion in those pages to use.on()
or.trigger()
and describe the behavior of the event since I think people still want/need those event-specific details.