Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) Simplify the non-normative descriptions of index getters to a…
…void confusing readers (the specifics of edge cases are rather subtle).

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12299

git-svn-id: http://svn.whatwg.org/webapps@6223 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 14, 2011
1 parent 4030e71 commit 444ecb7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 50 deletions.
21 changes: 5 additions & 16 deletions complete.html
Expand Up @@ -7691,7 +7691,6 @@ <h5 id=htmlcollection-0><span class=secno>2.8.2.1 </span>HTMLCollection</h5>
<dt><var title="">collection</var>(<var title="">index</var>)</dt>
<dd>
<p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-namedItem><a href=#dom-htmlcollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
Expand All @@ -7700,7 +7699,6 @@ <h5 id=htmlcollection-0><span class=secno>2.8.2.1 </span>HTMLCollection</h5>
<dd>
<p>Returns the first item with <a href=#concept-id title=concept-id>ID</a> or name <var title="">name</var>
from the collection.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or name could be found.</p>
<p>Only <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
<code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
<code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
Expand Down Expand Up @@ -7775,7 +7773,6 @@ <h5 id=htmlallcollection-0><span class=secno>2.8.2.2 </span>HTMLAllCollection</h
<dt><var title="">collection</var>(<var title="">index</var>)</dt>
<dd>
<p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
Expand All @@ -7785,7 +7782,6 @@ <h5 id=htmlallcollection-0><span class=secno>2.8.2.2 </span>HTMLAllCollection</h
<dd>
<p>Returns the item with <a href=#concept-id title=concept-id>ID</a> or name <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then an <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object containing all those elements is returned.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or name could be found.</p>
<p>Only <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
<code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
<code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
Expand Down Expand Up @@ -7874,7 +7870,6 @@ <h5 id=htmlformcontrolscollection-0><span class=secno>2.8.2.3 </span>HTMLFormCon
<dt><var title="">collection</var>(<var title="">index</var>)</dt>
<dd>
<p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLFormControlsCollection-namedItem><a href=#dom-htmlformcontrolscollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
Expand All @@ -7884,7 +7879,6 @@ <h5 id=htmlformcontrolscollection-0><span class=secno>2.8.2.3 </span>HTMLFormCon
<dd>
<p>Returns the item with <a href=#concept-id title=concept-id>ID</a> or <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then a <code><a href=#radionodelist>RadioNodeList</a></code> object containing all those elements is returned.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> could be found.</p>
</dd>

<dt><var title="">radioNodeList</var> . <var title="">value</var> [ = <var title="">value</var> ]</dt>
Expand Down Expand Up @@ -7994,7 +7988,6 @@ <h5 id=htmloptionscollection-0><span class=secno>2.8.2.4 </span>HTMLOptionsColle
<dt><var title="">collection</var>(<var title="">index</var>)</dt>
<dd>
<p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLOptionsCollection-namedItem><a href=#dom-htmloptionscollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
Expand All @@ -8004,7 +7997,6 @@ <h5 id=htmloptionscollection-0><span class=secno>2.8.2.4 </span>HTMLOptionsColle
<dd>
<p>Returns the item with <a href=#concept-id title=concept-id>ID</a> or <code title=attr-option-name><a href=#attr-option-name>name</a></code> <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then a <code><a href=#nodelist>NodeList</a></code> object containing all those elements is returned.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> could be found.</p>
</dd>

<dt><var title="">collection</var> . <code title=dom-HTMLOptionsCollection-add><a href=#dom-htmloptionscollection-add>add</a></code>(<var title="">element</var> [, <var title="">before</var> ] )</dt>
Expand Down Expand Up @@ -8172,16 +8164,19 @@ <h5 id=htmlpropertiescollection-0><span class=secno>2.8.2.5 </span>HTMLPropertie
<dt><var title="">collection</var>(<var title="">index</var>)</dt>
<dd>
<p>Returns the element with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">propertyNodeList</var> = <var title="">collection</var> . <code title=dom-HTMLPropertiesCollection-namedItem><a href=#dom-htmlpropertiescollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dt><var title="">collection</var>(<var title="">name</var>)</dt>
<dd>
<p>Returns a <code><a href=#propertynodelist>PropertyNodeList</a></code> object containing any elements that add a property named <var title="">name</var>.</p>
</dd>

<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dd>
<p>Returns a <code><a href=#propertynodelist>PropertyNodeList</a></code> object containing any elements that add a property named <var title="">name</var>. The <var title="">name</var> index has to be one of the values listed in the <code title=dom-HTMLPropertiesCollection-names><a href=#dom-htmlpropertiescollection-names>names</a></code> list.</p>
</dd>

<dt><var title="">collection</var> . <code title=dom-HTMLPropertiesCollection-names><a href=#dom-htmlpropertiescollection-names>names</a></code></dt>
<dd>
<p>Returns a <code>DOMStringList</code> with the <a href=#property-names>property names</a> of the elements in the collection.</p>
Expand Down Expand Up @@ -8263,7 +8258,6 @@ <h4 id=domtokenlist-0><span class=secno>2.8.3 </span>DOMTokenList</h4>
<dt><var title="">tokenlist</var>[<var title="">index</var>]</dt>
<dd>
<p>Returns the token with index <var title="">index</var>. The tokens are returned in the order they are found in the underlying string.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">hastoken</var> = <var title="">tokenlist</var> . <code title=dom-tokenlist-contains><a href=#dom-tokenlist-contains>contains</a></code>(<var title="">token</var>)</dt>
Expand Down Expand Up @@ -41840,8 +41834,6 @@ <h4 id=categories><span class=secno>4.10.2 </span>Categories</h4>
<code><a href=#nodelist>NodeList</a></code> object containing all those elements is
returned.</p>

<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> could be found.</p>

</dd>

<dt><var title="">form</var> . <code title=dom-form-submit><a href=#dom-form-submit>submit</a></code>()</dt>
Expand Down Expand Up @@ -48463,7 +48455,6 @@ <h4 id=the-select-element><span class=secno>4.10.9 </span>The <dfn><code>select<
<dt><var title="">select</var>[<var title="">index</var>]</dt>
<dd>
<p>Returns the item with index <var title="">index</var> from the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">element</var> = <var title="">select</var> . <code title=dom-select-item><a href=#dom-select-item>namedItem</a></code>(<var title="">name</var>)</dt>
Expand Down Expand Up @@ -73712,8 +73703,6 @@ <h4 id=the-undomanager-interface><span class=secno>8.8.2 </span>The <code><a hre

<p>Returns the entry with index <var title="">index</var> in the undo history.</p>

<p>Returns null if <var title="">index</var> is out of range.</p>

</dd>

<dt><var title="">undoManager</var> . <code title=dom-UndoManager-position><a href=#dom-undomanager-position>position</a></code></dt>
Expand Down
21 changes: 5 additions & 16 deletions index
Expand Up @@ -7681,7 +7681,6 @@ explained in the previous section, which talks about RFC 2119. -->
<dt><var title="">collection</var>(<var title="">index</var>)</dt>
<dd>
<p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-namedItem><a href=#dom-htmlcollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
Expand All @@ -7690,7 +7689,6 @@ explained in the previous section, which talks about RFC 2119. -->
<dd>
<p>Returns the first item with <a href=#concept-id title=concept-id>ID</a> or name <var title="">name</var>
from the collection.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or name could be found.</p>
<p>Only <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
<code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
<code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
Expand Down Expand Up @@ -7765,7 +7763,6 @@ explained in the previous section, which talks about RFC 2119. -->
<dt><var title="">collection</var>(<var title="">index</var>)</dt>
<dd>
<p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
Expand All @@ -7775,7 +7772,6 @@ explained in the previous section, which talks about RFC 2119. -->
<dd>
<p>Returns the item with <a href=#concept-id title=concept-id>ID</a> or name <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then an <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object containing all those elements is returned.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or name could be found.</p>
<p>Only <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
<code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
<code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
Expand Down Expand Up @@ -7864,7 +7860,6 @@ interface <dfn id=radionodelist>RadioNodeList</dfn> : <a href=#nodelist>NodeList
<dt><var title="">collection</var>(<var title="">index</var>)</dt>
<dd>
<p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLFormControlsCollection-namedItem><a href=#dom-htmlformcontrolscollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
Expand All @@ -7874,7 +7869,6 @@ interface <dfn id=radionodelist>RadioNodeList</dfn> : <a href=#nodelist>NodeList
<dd>
<p>Returns the item with <a href=#concept-id title=concept-id>ID</a> or <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then a <code><a href=#radionodelist>RadioNodeList</a></code> object containing all those elements is returned.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> could be found.</p>
</dd>

<dt><var title="">radioNodeList</var> . <var title="">value</var> [ = <var title="">value</var> ]</dt>
Expand Down Expand Up @@ -7984,7 +7978,6 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
<dt><var title="">collection</var>(<var title="">index</var>)</dt>
<dd>
<p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLOptionsCollection-namedItem><a href=#dom-htmloptionscollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
Expand All @@ -7994,7 +7987,6 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
<dd>
<p>Returns the item with <a href=#concept-id title=concept-id>ID</a> or <code title=attr-option-name><a href=#attr-option-name>name</a></code> <var title="">name</var> from the collection.</p>
<p>If there are multiple matching items, then a <code><a href=#nodelist>NodeList</a></code> object containing all those elements is returned.</p>
<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> could be found.</p>
</dd>

<dt><var title="">collection</var> . <code title=dom-HTMLOptionsCollection-add><a href=#dom-htmloptionscollection-add>add</a></code>(<var title="">element</var> [, <var title="">before</var> ] )</dt>
Expand Down Expand Up @@ -8162,16 +8154,19 @@ interface <dfn id=propertynodelist>PropertyNodeList</dfn> : <a href=#nodelist>No
<dt><var title="">collection</var>(<var title="">index</var>)</dt>
<dd>
<p>Returns the element with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">propertyNodeList</var> = <var title="">collection</var> . <code title=dom-HTMLPropertiesCollection-namedItem><a href=#dom-htmlpropertiescollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dt><var title="">collection</var>(<var title="">name</var>)</dt>
<dd>
<p>Returns a <code><a href=#propertynodelist>PropertyNodeList</a></code> object containing any elements that add a property named <var title="">name</var>.</p>
</dd>

<dt><var title="">collection</var>[<var title="">name</var>]</dt>
<dd>
<p>Returns a <code><a href=#propertynodelist>PropertyNodeList</a></code> object containing any elements that add a property named <var title="">name</var>. The <var title="">name</var> index has to be one of the values listed in the <code title=dom-HTMLPropertiesCollection-names><a href=#dom-htmlpropertiescollection-names>names</a></code> list.</p>
</dd>

<dt><var title="">collection</var> . <code title=dom-HTMLPropertiesCollection-names><a href=#dom-htmlpropertiescollection-names>names</a></code></dt>
<dd>
<p>Returns a <code>DOMStringList</code> with the <a href=#property-names>property names</a> of the elements in the collection.</p>
Expand Down Expand Up @@ -8253,7 +8248,6 @@ interface <dfn id=propertynodelist>PropertyNodeList</dfn> : <a href=#nodelist>No
<dt><var title="">tokenlist</var>[<var title="">index</var>]</dt>
<dd>
<p>Returns the token with index <var title="">index</var>. The tokens are returned in the order they are found in the underlying string.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">hastoken</var> = <var title="">tokenlist</var> . <code title=dom-tokenlist-contains><a href=#dom-tokenlist-contains>contains</a></code>(<var title="">token</var>)</dt>
Expand Down Expand Up @@ -41833,8 +41827,6 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<code><a href=#nodelist>NodeList</a></code> object containing all those elements is
returned.</p>

<p>Returns null if no element with that <a href=#concept-id title=concept-id>ID</a> or <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> could be found.</p>

</dd>

<dt><var title="">form</var> . <code title=dom-form-submit><a href=#dom-form-submit>submit</a></code>()</dt>
Expand Down Expand Up @@ -48456,7 +48448,6 @@ You cannot submit this form when the field is incorrect.</samp></pre>
<dt><var title="">select</var>[<var title="">index</var>]</dt>
<dd>
<p>Returns the item with index <var title="">index</var> from the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>. The items are sorted in <a href=#tree-order>tree order</a>.</p>
<p>Returns null if <var title="">index</var> is out of range.</p>
</dd>

<dt><var title="">element</var> = <var title="">select</var> . <code title=dom-select-item><a href=#dom-select-item>namedItem</a></code>(<var title="">name</var>)</dt>
Expand Down Expand Up @@ -73731,8 +73722,6 @@ interface <dfn>FunctionObjectCallback</dfn> {

<p>Returns the entry with index <var title="">index</var> in the undo history.</p>

<p>Returns null if <var title="">index</var> is out of range.</p>

</dd>

<dt><var title="">undoManager</var> . <code title=dom-UndoManager-position><a href=#dom-undomanager-position>position</a></code></dt>
Expand Down

0 comments on commit 444ecb7

Please sign in to comment.