Skip to content

Commit 3d4b0f3

Browse files
committed
Document null/undef args to $.extend(), close gh-97.
1 parent 9fed43b commit 3d4b0f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

entries/jQuery.extend.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</signature>
3131
<desc>Merge the contents of two or more objects together into the first object.</desc>
3232
<longdesc>
33-
<p>When two or more objects are supplied to <code>$.extend()</code>, properties from all of the objects are added to the target object.</p>
33+
<p>When two or more object arguments are supplied to <code>$.extend()</code>, properties from all of the objects are added to the target object. Arguments that are <code>null</code> or <code>undefined</code> are ignored.</p>
3434
<p>If only one argument is supplied to <code>$.extend()</code>, this means the target argument was omitted. In this case, the jQuery object itself is assumed to be the target. By doing this, you can add new functions to the jQuery namespace. This can be useful for plugin authors wishing to add new methods to JQuery.</p>
3535
<p>Keep in mind that the target object (first argument) will be modified, and will also be returned from <code>$.extend()</code>. If, however, you want to preserve both of the original objects, you can do so by passing an empty object as the target:</p>
3636
<pre><code>var object = $.extend({}, object1, object2);</code></pre>

0 commit comments

Comments
 (0)