-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document deprecation of event shorthands like jQuery.fn.click() #1205
Milestone
Comments
mgol
added a commit
to mgol/api.jquery.com
that referenced
this issue
Apr 16, 2023
mgol
added a commit
to mgol/api.jquery.com
that referenced
this issue
Apr 17, 2023
mgol
added a commit
to mgol/api.jquery.com
that referenced
this issue
Apr 23, 2023
mgol
added a commit
that referenced
this issue
Apr 24, 2023
Mark all event shorthands as deprecated, including the AJAX ones. Create separate pages for deprecated shorthands, for example: * `/click/` describes the `click` event and how to use it with `.on()` or `.trigger()` * `/click-shorthand/` describes the deprecated `.click()` method * `/ajaxStart/` describes the `ajaxStart` event and how to use it with `.on()` * `/ajaxStart-shorthand/` describes the deprecated `.ajaxStart()` method The reason for such an approach is that event pages often contained useful information about those specific events and we didn't want to lose that. Also, the new shorthand pages all look the same and mostly redirect to the event pages so we didn't want to treat them as the primary page to go to when searching for an event. To make it less confusing, both the event page & its associated shorthand method page link to each other. Separate shorthand pages have also been created for `.load()`, `.unload()` and `.error()` methods. Those methods have already been removed in jQuery 3.0 but they also contained useful info about the associated events so it made sense to treat them like other event shorthands. Because there's no way to include both `.on()` & `.trigger()` usage in a single entry, event pages (except for AJAX ones) now have two entries each. This required wrapping the previous single `<entry>` with the new `<entries>`. To maintain Git history, the inner `<entry>` tags are left de-indented. Usage of deprecated event shorthand methods have been removed across all API entries. Fixes gh-1205 Closes gh-1223
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The shorthand .click / .change is missing from
https://api.jquery.com/category/deprecated/
https://github.com/jquery/api.jquery.com/blob/main/entries/click.xml#L26
The text was updated successfully, but these errors were encountered: