Skip to content

Commit 8b01114

Browse files
committed
Update arg names, types for accuracy, consistency
* Change type="Map" to type="PlainObject" * Change name="events-map" to name="events" * Change name="eventTypes" to name="events"
1 parent 748c844 commit 8b01114

File tree

13 files changed

+25
-25
lines changed

13 files changed

+25
-25
lines changed

entries/animate.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<desc>Perform a custom animation of a set of CSS properties.</desc>
33
<signature>
44
<added>1.0</added>
5-
<argument name="properties" type="Map">
5+
<argument name="properties" type="PlainObject">
66
<desc>A map of CSS properties that the animation will move toward.</desc>
77
</argument>
88
<argument name="duration" type="String,Number" optional="true">
@@ -17,10 +17,10 @@
1717
</signature>
1818
<signature>
1919
<added>1.0</added>
20-
<argument name="properties" type="Map">
20+
<argument name="properties" type="PlainObject">
2121
<desc>A map of CSS properties that the animation will move toward.</desc>
2222
</argument>
23-
<argument name="options" type="Map">
23+
<argument name="options" type="PlainObject">
2424
<desc>A map of additional options to pass to the method. Supported keys:
2525
<ul>
2626
<li><code>duration</code>: A string or number determining how long the animation will run.</li>

entries/attr.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var title = $("em").attr("title");
5353
</signature>
5454
<signature>
5555
<added>1.0</added>
56-
<argument name="map" type="Map">
56+
<argument name="attributes" type="PlainObject">
5757
<desc>A map of attribute-value pairs to set.</desc>
5858
</argument>
5959
</signature>
@@ -78,7 +78,7 @@ var title = $("em").attr("title");
7878
.attr('title', 'Photo by Kelly Clark');</pre>
7979

8080
<h4 id="setting-several-attrs">Setting several attributes at once</h4>
81-
<p>To change the <code>alt</code> attribute and add the <code>title</code> attribute at the same time, pass both sets of names and values into the method at once using a map (JavaScript object literal). Each key-value pair in the map adds or modifies an attribute:</p>
81+
<p>To change the <code>alt</code> attribute and add the <code>title</code> attribute at the same time, pass both sets of names and values into the method at once using a map (plain JavaScript object). Each key-value pair in the map adds or modifies an attribute:</p>
8282
<pre>$('#greatphoto').attr({
8383
alt: 'Beijing Brush Seller',
8484
title: 'photo by Kelly Clark'

entries/css.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ div { width:60px; height:60px; margin:5px; float:left; }
6262
</signature>
6363
<signature>
6464
<added>1.0</added>
65-
<argument name="map" type="Map">
65+
<argument name="properties" type="PlainObject">
6666
<desc>A map of property-value pairs to set.</desc>
6767
</argument>
6868
</signature>

entries/delegate.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<argument name="selector" type="String">
3333
<desc>A selector to filter the elements that trigger the event.</desc>
3434
</argument>
35-
<argument name="events" type="Map">
35+
<argument name="events" type="PlainObject">
3636
<desc>A map of one or more event types and functions to execute for them.</desc>
3737
</argument>
3838
</signature>

entries/die.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</signature>
3232
<signature>
3333
<added>1.4.3</added>
34-
<argument name="eventTypes" type="Map">
34+
<argument name="events" type="PlainObject">
3535
<desc>A map of one or more event types, such as <code>click</code> or <code>keydown</code> and their corresponding functions that are no longer to be executed.</desc>
3636
</argument>
3737
</signature>

entries/jQuery.ajax.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
</signature>
1111
<signature>
1212
<added>1.0</added>
13-
<argument name="settings" type="Map">
13+
<argument name="settings" type="Map" optional="true">
1414
<desc>A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with <a href="/jQuery.ajaxSetup">$.ajaxSetup()</a>.</desc>
15-
<option default="depends on DataType" name="accepts" type="Map">
15+
<option default="depends on DataType" name="accepts" type="PlainObject">
1616
<desc>The content type sent in the request header that tells the server what kind of response it will accept in return. If the <code>accepts</code> setting needs modification, it is recommended to do so once in the <code>$.ajaxSetup()</code> method.</desc>
1717
</option>
1818
<option default="true" name="async" type="Boolean">
@@ -27,7 +27,7 @@
2727
<option name="complete(jqXHR, textStatus)" type="Function, Array">
2828
<desc>A function to be called when the request finishes (after <code>success</code> and <code>error</code> callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request (<code>"success"</code>, <code>"notmodified"</code>, <code>"error"</code>, <code>"timeout"</code>, <code>"abort"</code>, or <code>"parsererror"</code>). <strong>As of jQuery 1.5</strong>, the <code>complete</code> setting can accept an array of functions. Each function will be called in turn. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.</desc>
2929
</option>
30-
<option name="contents" type="Map" added="1.5">
30+
<option name="contents" type="PlainObject" added="1.5">
3131
<desc>A map of string/regular-expression pairs that determine how jQuery will parse the response, given its content type.</desc>
3232
</option>
3333
<option default="'application/x-www-form-urlencoded'" name="contentType" type="String">
@@ -41,7 +41,7 @@
4141
$(this).addClass("done");
4242
});</pre></desc>
4343
</option>
44-
<option name="converters" type="Map" default='{"* text": window.String, "text html": true, "text json": jQuery.parseJSON, "text xml": jQuery.parseXML}' added="1.5">
44+
<option name="converters" type="PlainObject" default='{"* text": window.String, "text html": true, "text json": jQuery.parseJSON, "text xml": jQuery.parseXML}' added="1.5">
4545
<desc>A map of dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response.</desc>
4646
</option>
4747
<option name="crossDomain" type="Boolean" default="false for same-domain requests, true for cross-domain requests" added="1.5">
@@ -72,7 +72,7 @@
7272
<option default="true" name="global" type="Boolean">
7373
<desc>Whether to trigger global Ajax event handlers for this request. The default is <code>true</code>. Set to <code>false</code> to prevent the global handlers like <code>ajaxStart</code> or <code>ajaxStop</code> from being triggered. This can be used to control various <a href='http://docs.jquery.com/Ajax_Events'>Ajax Events</a>.</desc>
7474
</option>
75-
<option name="headers" type="Map" default="{}" added="1.5">
75+
<option name="headers" type="PlainObject" default="{}" added="1.5">
7676
<desc>A map of additional header key/value pairs to send along with the request. This setting is set before the <code>beforeSend</code> function is called; therefore, any values in the headers setting can be overwritten from within the <code>beforeSend</code> function.</desc>
7777
</option>
7878
<option default="false" name="ifModified" type="Boolean">
@@ -99,7 +99,7 @@
9999
<option name="scriptCharset" type="String">
100100
<desc>Only for requests with "jsonp" or "script" dataType and "GET" type. Forces the request to be interpreted as a certain charset. Only needed for charset differences between the remote and local content.</desc>
101101
</option>
102-
<option name="statusCode" type="Map" default="{}" added="1.5">
102+
<option name="statusCode" type="PlainObject" default="{}" added="1.5">
103103
<desc>
104104
<p>A map of numeric HTTP codes and functions to be called when the response has the corresponding code. For example, the following will alert when the response status is a 404:</p>
105105
<pre>$.ajax({
@@ -133,7 +133,7 @@
133133
<option name="xhr" type="Function" default="ActiveXObject when available (IE), the XMLHttpRequest otherwise">
134134
<desc>Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory.</desc>
135135
</option>
136-
<option name="xhrFields" type="Map" added="1.5.1">
136+
<option name="xhrFields" type="PlainObject" added="1.5.1">
137137
<desc><p>A map of fieldName-fieldValue pairs to set on the native <code><abbr title="XMLHttpRequest">XHR</abbr></code> object. For example, you can use it to set <code>withCredentials</code> to <code>true</code> for cross-domain requests if needed.
138138
<pre>$.ajax({
139139
url: a_cross_domain_url,

entries/jQuery.getJSON.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<argument name="url" type="String">
55
<desc>A string containing the URL to which the request is sent.</desc>
66
</argument>
7-
<argument name="data" optional="true" type="Map">
7+
<argument name="data" optional="true" type="PlainObject">
88
<desc>A map or string that is sent to the server with the request.</desc>
99
</argument>
1010
<argument name="success(data, textStatus, jqXHR)" optional="true" type="Function">

entries/live.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</signature>
2525
<signature>
2626
<added>1.4.3</added>
27-
<argument name="events-map" type="PlainObject">
27+
<argument name="events" type="PlainObject">
2828
<desc>A map of one or more JavaScript event types and functions to execute for them.</desc>
2929
</argument>
3030
</signature>

entries/off.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</signature>
1515
<signature>
1616
<added>1.7</added>
17-
<argument name="events-map" type="Map">
17+
<argument name="events" type="PlainObject">
1818
<desc>A map where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s).</desc>
1919
</argument>
2020
<argument name="selector" type="String" optional="true">
@@ -30,7 +30,7 @@
3030

3131
<p>A handler can also be removed by specifying the function name in the <code>handler</code> argument. When jQuery attaches an event handler, it assigns a unique id to the handler function. Handlers proxied by <a href="http://api.jquery.com/jQuery.proxy"><code>jQuery.proxy()</code></a> or a similar mechanism will all have the same unique id (the proxy function), so passing proxied handlers to <code>.off</code> may remove more handlers than intended. In those situations it is better to attach and remove event handlers using namespaces.</p>
3232

33-
<p>As with <code>.on()</code>, you can pass an <code>events-map</code> argument instead of specifying the <code>events</code> and <code>handler</code> as separate arguments. The keys are events and/or namespaces; the values are handler functions or the special value <code>false</code>.</p>
33+
<p>As with <code>.on()</code>, you can pass <code>events</code> as an object instead of specifying an <code>events</code> string and <code>handler</code> function as separate arguments. The keys for the <code>events</code> object are events and/or namespaces; the values are handler functions or the special value <code>false</code>.</p>
3434
</longdesc>
3535
<example>
3636
<desc>Add and remove event handlers on the colored button.</desc>

entries/on.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</signature>
1818
<signature>
1919
<added>1.7</added>
20-
<argument name="events-map" type="Map">
20+
<argument name="events" type="PlainObject">
2121
<desc>A map in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).</desc>
2222
</argument>
2323
<argument name="selector" type="String" optional="true">
@@ -37,7 +37,7 @@
3737

3838
<p>An event name can be qualified by <em>event namespaces</em> that simplify removing or triggering the event. For example, <code>"click.myPlugin.simple"</code> defines both the myPlugin and simple namespaces for this particular click event. A click event handler attached via that string could be removed with <code>.off("click.myPlugin")</code> or <code>.off("click.simple")</code> without disturbing other click handlers attached to the elements. Namespaces are similar to CSS classes in that they are not hierarchical; only one name needs to match. Namespaces beginning with an underscore are reserved for jQuery's use.</p>
3939

40-
<p>In the second form of <code>.on()</code>, the <code>events-map</code> argument is a JavaScript Object, or "map". The keys are strings in the same form as the <code>events</code> argument with space-separated event type names and optional namespaces. The value for each key is a function (or <code>false</code> value) that is used as the <code>handler</code> instead of the final argument to the method. In other respects, the two forms are identical in their behavior as described below.</p>
40+
<p>In the second form of <code>.on()</code>, the <code>events</code> argument is a JavaScript Object, or "map". The keys are strings in the same form as the <code>events</code> argument with space-separated event type names and optional namespaces. The value for each key is a function (or <code>false</code> value) that is used as the <code>handler</code> instead of the final argument to the method. In other respects, the two forms are identical in their behavior as described below.</p>
4141

4242
<h2 id="direct-and-delegated-events">Direct and delegated events</h2>
4343

@@ -66,7 +66,7 @@ $("#dataTable tbody").on("click", "tr", function(event){
6666

6767
<h2 id="event-handler">The event handler and its environment</h2>
6868

69-
<p>The <code>handler</code> argument is a function (or the value <code>false</code>, see below), and is required unless the <code>events-map</code> form is used. You can provide an anonymous handler function at the point of the <code>.on()</code> call, as the examples have done above, or declare a named function and pass its name:</p>
69+
<p>The <code>handler</code> argument is a function (or the value <code>false</code>, see below), and is required unless you pass an object for the <code>events</code> argument. You can provide an anonymous handler function at the point of the <code>.on()</code> call, as the examples have done above, or declare a named function and pass its name:</p>
7070
<pre>
7171
function notify() { alert("clicked"); }
7272
$("button").on("click", notify);

entries/one.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</signature>
3030
<signature>
3131
<added>1.7</added>
32-
<argument name="events-map" type="Map">
32+
<argument name="events" type="PlainObject">
3333
<desc>A map in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).</desc>
3434
</argument>
3535
<argument name="selector" type="String" optional="true">

entries/prop.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ $("input").change(function() {
9090
</signature>
9191
<signature>
9292
<added>1.6</added>
93-
<argument name="map" type="Map">
93+
<argument name="properties" type="PlainObject">
9494
<desc>A map of property-value pairs to set.</desc>
9595
</argument>
9696
</signature>

entries/undelegate.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<argument name="selector" type="String">
3030
<desc>A selector which will be used to filter the event results.</desc>
3131
</argument>
32-
<argument name="events" type="Map">
32+
<argument name="events" type="PlainObject">
3333
<desc>A map of one or more event types and previously bound functions to unbind from them.</desc>
3434
</argument>
3535
</signature>

0 commit comments

Comments
 (0)