Skip to content

Commit 226f67d

Browse files
committed
All: Make deprecation warnings more prominent
1 parent 5c72da2 commit 226f67d

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

entries/deferred.pipe.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
</signature>
3535
<desc> Utility method to filter and/or chain Deferreds. </desc>
3636
<longdesc>
37-
<p><strong>Deprecation Notice:</strong>As of jQuery 1.8, the deferred.pipe() method is deprecated. The <code>deferred.then()</code> method, which replaces it, should be used instead.</p>
37+
<div class="warning">
38+
<p><strong>Deprecation Notice:</strong>As of jQuery 1.8, the deferred.pipe() method is deprecated. The <code>deferred.then()</code> method, which replaces it, should be used instead.</p>
39+
</div>
3840
<p>The <code>deferred.pipe()</code> method returns a new promise that filters the status and values of a deferred through a function. The <code>doneFilter</code> and <code>failFilter</code> functions filter the original deferred's resolved / rejected status and values. <strong>As of jQuery 1.7</strong>, the method also accepts a <code>progressFilter</code> function to filter any calls to the original deferred's <code>notify</code> or <code>notifyWith</code> methods. These filter functions can return a new value to be passed along to the piped promise's <code>done()</code> or <code>fail()</code> callbacks, or they can return another observable object (Deferred, Promise, etc) which will pass its resolved / rejected status and values to the piped promise's callbacks. If the filter function used is <code>null</code>, or not specified, the piped promise will be resolved or rejected with the same values as the original.</p>
3941
</longdesc>
4042
<example>

entries/jQuery.fx.interval.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
<added>1.4.3</added>
77
</signature>
88
<longdesc>
9-
<p>This property is deprecated as of version 3.0, and has no effect in browsers that support the <a href="https://caniuse.com/#feat=requestanimationframe"><code>requestAnimationFrame</code></a> method.</p>
9+
<div class="warning">
10+
<p>This property is deprecated as of version 3.0, and has no effect in browsers that support the <a href="https://caniuse.com/#feat=requestanimationframe"><code>requestAnimationFrame</code></a> method.</p>
11+
</div>
1012
<p>On browsers that do not support <code>requestAnimationFrame</code>, this property can be changed to adjust the interval at which animations will run. The default is 13 milliseconds.</p>
1113
<p>Since jQuery uses one global interval, no animation should be running or all animations should stop for the change of this property to take effect.</p>
1214
</longdesc>

entries/jQuery.parseJSON.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
</signature>
1515
<desc>Takes a well-formed JSON string and returns the resulting JavaScript value.</desc>
1616
<longdesc>
17-
<p>As of jQuery 3.0, <code>$.parseJSON</code> is deprecated. To parse JSON strings use the native <code>JSON.parse</code> method instead.</p>
17+
<div class="warning">
18+
<p>As of jQuery 3.0, <code>$.parseJSON</code> is deprecated. To parse JSON strings use the native <code>JSON.parse</code> method instead.</p>
19+
</div>
1820
<p>Passing in a malformed JSON string results in a JavaScript exception being thrown. For example, the following are all invalid JSON strings:</p>
1921
<ul>
2022
<li><code>"{test: 1}"</code> (test does not have double quotes around it).</li>

entries/jQuery.unique.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
</signature>
1010
<desc>Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.</desc>
1111
<longdesc>
12-
<p><strong>As of jQuery 3.0, this method is deprecated and just an alias of <code><a href="/jQuery.uniqueSort/">jQuery.uniqueSort()</a></code>. Please use that method instead.</strong></p>
12+
<div class="warning">
13+
<p>As of jQuery 3.0, this method is deprecated and just an alias of <code><a href="/jQuery.uniqueSort/">jQuery.uniqueSort()</a></code>. Please use that method instead.</p>
14+
</div>
1315
<p>The <code>$.unique()</code> function searches through an array of objects, sorting the array, and removing any duplicate nodes. A node is considered a duplicate if it is the <em>exact same</em> node as one already in the array; two different nodes with identical attributes are not considered to be duplicates. This function only works on plain JavaScript arrays of DOM elements, and is chiefly used internally by jQuery. You probably will never need to use it.</p>
1416
<p>As of jQuery 1.4 the results will always be returned in document order.</p>
1517
</longdesc>

0 commit comments

Comments
 (0)