Skip to content
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

Docs: Mark jQuery.fn.load( [ eventData ], handler ) as removed #482

Merged
merged 3 commits into from
Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions warnings.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ This is _not_ a warning, but a console log message the plugin shows when it firs

**Solution:** Change any use of `$().error(fn)` to `$().on("error", fn)`.

### \[shorthand-removed-v3\] JQMIGRATE: jQuery.fn.load() is deprecated
### \[shorthand-removed-v3\] JQMIGRATE: jQuery.fn.unload() is deprecated
### \[shorthand-removed-v3\] JQMIGRATE: jQuery.fn.load( [ eventData ], handler ) is deprecated and removed
### \[shorthand-removed-v3\] JQMIGRATE: jQuery.fn.unload() is deprecated and removed
mgol marked this conversation as resolved.
Show resolved Hide resolved

**Cause:** The `.load()` and `.unload()` event methods attach a "load" and "unload" event, respectively, to an element. They were deprecated in 1.9 and removed in 3.0 to reduce confusion with the AJAX-related `.load()` method that loads HTML fragments and which has not been deprecated. Note that these two methods are used almost exclusively with a jQuery collection consisting of only the `window` element. Also note that attaching an "unload" or "beforeunload" event on a window via any means can impact performance on some browsers because it disables the document cache (bfcache). For that reason we strongly advise against it.

Expand Down