Skip to content

Commit 1d93022

Browse files
authored
Docs: Fix an incorrect warning message & other issues in warnings.md
Changes: 1. Update an incorrect message for `event-global` - it was copied from another unrelated one. 2. Fix minor typos & make text more clear in some places. Closes gh-593
1 parent e6375e4 commit 1d93022

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

warnings.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs
9292

9393
### \[unique\] JQMIGRATE: jQuery.unique() is removed; use jQuery.uniqueSort()
9494

95-
**Cause**: The fact that `jQuery.unique` sorted its results in DOM order was surprising to many who did not read the documentation carefully. As of jQuery 3.0 this function is being renamed to make it clear. As of jQuery 4.0, the old alias no longer exists.
95+
**Cause**: The fact that `jQuery.unique` sorted its results in DOM order was surprising to many who did not read the documentation carefully. The function was renamed in jQuery 3.0 to make it clear. As of jQuery 4.0, the old alias no longer exists.
9696

9797
**Solution**: Replace all uses of `jQuery.unique` with `jQuery.uniqueSort` which is the same function with a better name.
9898

@@ -134,7 +134,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs
134134

135135
### \[trim\] JQMIGRATE: jQuery.trim() is removed; use String.prototype.trim
136136

137-
**Cause:** Older versions of IE & Android Browser didn't implement a method to `trim` strings so jQuery provided a cross-browser implementation. The browsers supported by jQuery 3.0 all provide a standard method for this purpose.
137+
**Cause:** Older versions of IE & Android Browser didn't implement a method to `trim` strings so jQuery provided a cross-browser implementation. The browsers supported by jQuery 4.x all provide a standard method for this purpose.
138138

139139
**Solution:** Replace any calls to `jQuery.trim( text )` with `text.trim()` if you know `text` is a string; otherwise, you can replace it with `String.prototype.trim.call( text == null ? "" : text )`.
140140

@@ -171,7 +171,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs
171171

172172
**Solution:** Rename all usage of `jQuery.Deferred.getStackHook` to `jQuery.Deferred.getErrorHook`. If you previously assigned a function returning an error stack to `jQuery.Deferred.getStackHook` or `jQuery.Deferred.getErrorHook`, change it to return a full error object. If you aim to still support jQuery <3.7, assign the hook to `jQuery.Deferred.getErrorHook` first and only later to `jQuery.Deferred.getStackHook` to avoid a Migrate warning.
173173

174-
### \[event-global\] JQMIGRATE: jQuery.Deferred.getStackHook is removed; use jQuery.Deferred.getErrorHook
174+
### \[event-global\] JQMIGRATE: jQuery.event.global is removed
175175

176176
**Cause:** `jQuery.event.global` was an object with keys being event names for which event listeners have ever been added. Originally, it was needed for performance reasons and to fix memory leaks in old IE, but since jQuery 1.9.0, the library has only been recording the events, but it was not using that information anywhere. jQuery 4.0.0 removes the API.
177177

@@ -198,7 +198,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs
198198
### \[expr-pre-pseudos\] JQMIGRATE: jQuery.expr\[':'\] is deprecated; use jQuery.expr.pseudos
199199
### \[expr-pre-pseudos\] JQMIGRATE: jQuery.expr.filters is deprecated; use jQuery.expr.pseudos
200200

201-
**Cause:** The standard way to add new custom selectors through jQuery is `jQuery.expr.pseudos`. These two other aliases are deprecated, although they still work as of jQuery 3.0.
201+
**Cause:** The standard way to add new custom selectors through jQuery is `jQuery.expr.pseudos`. These two other aliases are deprecated, although they still work as of jQuery 4.0.
202202

203203
**Solution:** Rename any of the older usage to `jQuery.expr.pseudos`. The functionality is identical.
204204

0 commit comments

Comments
 (0)