Skip to content

Commit 4bbafb7

Browse files
jp41011mgol
andauthored
Docs: Mark jQuery.fn.load( [ eventData ], handler ) as removed
Mark `jQuery.fn.load( [ eventData ], handler )` and `jQuery.fn.unload` as "is deprecated and removed". Both those methods were deprecated in jQuery 1.8 and removed in jQuery 3.0. The note about `jQuery.fn.load( [ eventData ], handler )` needs to be so verbose as there's a separate `.load()` ajax method: https://api.jquery.com/load/ See more information about the removed APIs: * https://api.jquery.com/load-event/ * https://api.jquery.com/unload/ Closes gh-482 Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
1 parent 8854efb commit 4bbafb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

warnings.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ This is _not_ a warning, but a console log message the plugin shows when it firs
6060

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

63-
### \[shorthand-removed-v3\] JQMIGRATE: jQuery.fn.load() is deprecated
64-
### \[shorthand-removed-v3\] JQMIGRATE: jQuery.fn.unload() is deprecated
63+
### \[shorthand-removed-v3\] JQMIGRATE: jQuery.fn.load( [ eventData ], handler ) is deprecated and removed
64+
### \[shorthand-removed-v3\] JQMIGRATE: jQuery.fn.unload() is deprecated and removed
6565

6666
**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.
6767

0 commit comments

Comments
 (0)