Skip to content

Commit 62e5c44

Browse files
authored
Update warnings.md - jquery.fn.unload()
I think that jquery.fn.unload() should have the "is deprecated and removed" label. .unload() was deprecated in jquery v1.8 and removed in v3.0 So if you get this "warning" it will not actually work once you remove the jquery migrate plugin. Reference: https://api.jquery.com/unload/
1 parent 0d082f9 commit 62e5c44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

warnings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs
6161
**Solution:** Change any use of `$().error(fn)` to `$().on("error", fn)`.
6262

6363
### \[shorthand-removed-v3\] JQMIGRATE: jQuery.fn.load() is deprecated
64-
### \[shorthand-removed-v3\] JQMIGRATE: jQuery.fn.unload() is deprecated
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)