[html5] r8645 - [e] (0) Various HTMLAllCollection fixes Fixing https://www.w3.org/Bugs/Public/sh [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue May 20 09:59:52 PDT 2014
Author: ianh
Date: 2014-05-20 09:59:49 -0700 (Tue, 20 May 2014)
New Revision: 8645
Modified:
complete.html
index
source
Log:
[e] (0) Various HTMLAllCollection fixes
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=25817
Affected topics: DOM APIs
Modified: complete.html
===================================================================
--- complete.html 2014-05-19 19:43:09 UTC (rev 8644)
+++ complete.html 2014-05-20 16:59:49 UTC (rev 8645)
@@ -290,7 +290,7 @@
</script><body onload=init()>
<header class="head with-buttons" id=head><p><a href=//www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 19 May 2014</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 20 May 2014</h2>
</hgroup><div>
<div>
<a href=//whatwg.org/html><span><strong>Multipage Version</strong> <code>whatwg.org/html</code></span></a>
@@ -7569,13 +7569,18 @@
<h5 id=htmlallcollection-0><span class=secno>2.7.2.1 </span>HTMLAllCollection</h5>
- <p>The <code><a href=#htmlallcollection>HTMLAllCollection</a></code> interface is used for generic <a href=#collections>collections</a> of
- elements just like <code><a href=#htmlcollection>HTMLCollection</a></code>, with the exception that its <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem()</a></code> method returns an
- <code><a href=#htmlcollection>HTMLCollection</a></code> object when there are multiple matching elements, and that its <code title=dom-HTMLAllCollection-item>item()</code> method can be used as a synonym for its <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem()</a></code> method. It is intended only for the
- legacy <code title=dom-document-all><a href=#dom-document-all>document.all</a></code> attribute.</p>
+ <p>The <code><a href=#htmlallcollection>HTMLAllCollection</a></code> interface is used for the legacy <code title=dom-document-all><a href=#dom-document-all>document.all</a></code> attribute. It operates similarly to
+ <code><a href=#htmlcollection>HTMLCollection</a></code>; the main differences are that its <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem()</a></code> method returns an
+ <code><a href=#htmlcollection>HTMLCollection</a></code> object when there are multiple matching elements, and that its <code title=dom-HTMLAllCollection-item><a href=#dom-htmlallcollection-item>item()</a></code> method can be used as a synonym for its <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem()</a></code> method.</p>
+ <p class=note>All <code><a href=#htmlallcollection>HTMLAllCollection</a></code> objects are rooted at a <code><a href=#document>Document</a></code>
+ and have a filter that matches all elements, so the elements <a href=#represented-by-the-collection>represented by the
+ collection</a> of an <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object consist of all the descendant
+ elements of the root <code><a href=#document>Document</a></code>.</p>
+
<pre class=idl>interface <dfn id=htmlallcollection>HTMLAllCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
- // inherits <span title=dom-HTMLCollection-length>length</span> and <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>(unsigned long index)
+ // inherits <span title=dom-HTMLCollection-length>length</span> and 'getter'
+ <a href=#element>Element</a>? <a href=#dom-htmlallcollection-item title=dom-HTMLAllCollection-item>item</a>(unsigned long index);
(<a href=#htmlcollection>HTMLCollection</a> or <a href=#element>Element</a>)? <a href=#dom-htmlallcollection-item-string title=dom-HTMLAllCollection-item-string>item</a>(DOMString name);
legacycaller getter (<a href=#htmlcollection>HTMLCollection</a> or <a href=#element>Element</a>)? <a href=#dom-htmlallcollection-nameditem title=dom-HTMLAllCollection-namedItem>namedItem</a>(DOMString name); // shadows inherited namedItem()
};</pre>
@@ -7585,7 +7590,7 @@
<p>Returns the number of elements in the collection.</p>
</dd>
- <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
+ <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLAllCollection-item><a href=#dom-htmlallcollection-item>item</a></code>(<var title="">index</var>)</dt>
<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>
@@ -7613,6 +7618,10 @@
<p>The object's <a href=#supported-property-indices>supported property indices</a> are as defined for
<code><a href=#htmlcollection>HTMLCollection</a></code> objects.</p>
+ <p>The <dfn id=dom-htmlallcollection-item title=dom-HTMLAllCollection-item><code>item()</code></dfn> method, when invoked
+ with a numeric argument, must act like the <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item()</a>
+ method inherited from <code><a href=#htmlcollection>HTMLCollection</a></code>.</p>
+
<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2837 -->
<p>The following elements are <dfn id=all-named-elements>"all"-named elements</dfn>:
<code><a href=#the-a-element>a</a></code>, <!-- in some browsers -->
@@ -7650,11 +7659,10 @@
<li>
<p>Let <var title="">collection</var> be an <code><a href=#htmlcollection>HTMLCollection</a></code> object rooted at the
- same node as the <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object on which the method was invoked, whose
- filter matches only elements that already match the filter of the <code><a href=#htmlallcollection>HTMLAllCollection</a></code>
- object on which the method was invoked and that are either:</p>
+ same <code><a href=#document>Document</a></code> as the <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object on which the method was
+ invoked, whose filter matches only elements that are either:</p>
- <ul><li><a href=#all-named-elements>"all"-named elements</a> with a <code title="">name</code> attribute
+ <ul><!--CLEANUP--><!--2x--><li><a href=#all-named-elements>"all"-named elements</a> with a <code title="">name</code> attribute
equal to <var title="">name</var>, or,</li>
<li>elements with an <a href=#concept-id title=concept-id>ID</a> equal to <var title="">name</var>.</li>
Modified: index
===================================================================
--- index 2014-05-19 19:43:09 UTC (rev 8644)
+++ index 2014-05-20 16:59:49 UTC (rev 8645)
@@ -290,7 +290,7 @@
</script><body onload=init()>
<header class="head with-buttons" id=head><p><a href=//www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 19 May 2014</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 20 May 2014</h2>
</hgroup><div>
<div>
<a href=//whatwg.org/html><span><strong>Multipage Version</strong> <code>whatwg.org/html</code></span></a>
@@ -7569,13 +7569,18 @@
<h5 id=htmlallcollection-0><span class=secno>2.7.2.1 </span>HTMLAllCollection</h5>
- <p>The <code><a href=#htmlallcollection>HTMLAllCollection</a></code> interface is used for generic <a href=#collections>collections</a> of
- elements just like <code><a href=#htmlcollection>HTMLCollection</a></code>, with the exception that its <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem()</a></code> method returns an
- <code><a href=#htmlcollection>HTMLCollection</a></code> object when there are multiple matching elements, and that its <code title=dom-HTMLAllCollection-item>item()</code> method can be used as a synonym for its <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem()</a></code> method. It is intended only for the
- legacy <code title=dom-document-all><a href=#dom-document-all>document.all</a></code> attribute.</p>
+ <p>The <code><a href=#htmlallcollection>HTMLAllCollection</a></code> interface is used for the legacy <code title=dom-document-all><a href=#dom-document-all>document.all</a></code> attribute. It operates similarly to
+ <code><a href=#htmlcollection>HTMLCollection</a></code>; the main differences are that its <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem()</a></code> method returns an
+ <code><a href=#htmlcollection>HTMLCollection</a></code> object when there are multiple matching elements, and that its <code title=dom-HTMLAllCollection-item><a href=#dom-htmlallcollection-item>item()</a></code> method can be used as a synonym for its <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem()</a></code> method.</p>
+ <p class=note>All <code><a href=#htmlallcollection>HTMLAllCollection</a></code> objects are rooted at a <code><a href=#document>Document</a></code>
+ and have a filter that matches all elements, so the elements <a href=#represented-by-the-collection>represented by the
+ collection</a> of an <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object consist of all the descendant
+ elements of the root <code><a href=#document>Document</a></code>.</p>
+
<pre class=idl>interface <dfn id=htmlallcollection>HTMLAllCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
- // inherits <span title=dom-HTMLCollection-length>length</span> and <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>(unsigned long index)
+ // inherits <span title=dom-HTMLCollection-length>length</span> and 'getter'
+ <a href=#element>Element</a>? <a href=#dom-htmlallcollection-item title=dom-HTMLAllCollection-item>item</a>(unsigned long index);
(<a href=#htmlcollection>HTMLCollection</a> or <a href=#element>Element</a>)? <a href=#dom-htmlallcollection-item-string title=dom-HTMLAllCollection-item-string>item</a>(DOMString name);
legacycaller getter (<a href=#htmlcollection>HTMLCollection</a> or <a href=#element>Element</a>)? <a href=#dom-htmlallcollection-nameditem title=dom-HTMLAllCollection-namedItem>namedItem</a>(DOMString name); // shadows inherited namedItem()
};</pre>
@@ -7585,7 +7590,7 @@
<p>Returns the number of elements in the collection.</p>
</dd>
- <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
+ <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLAllCollection-item><a href=#dom-htmlallcollection-item>item</a></code>(<var title="">index</var>)</dt>
<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>
@@ -7613,6 +7618,10 @@
<p>The object's <a href=#supported-property-indices>supported property indices</a> are as defined for
<code><a href=#htmlcollection>HTMLCollection</a></code> objects.</p>
+ <p>The <dfn id=dom-htmlallcollection-item title=dom-HTMLAllCollection-item><code>item()</code></dfn> method, when invoked
+ with a numeric argument, must act like the <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item()</a>
+ method inherited from <code><a href=#htmlcollection>HTMLCollection</a></code>.</p>
+
<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2837 -->
<p>The following elements are <dfn id=all-named-elements>"all"-named elements</dfn>:
<code><a href=#the-a-element>a</a></code>, <!-- in some browsers -->
@@ -7650,11 +7659,10 @@
<li>
<p>Let <var title="">collection</var> be an <code><a href=#htmlcollection>HTMLCollection</a></code> object rooted at the
- same node as the <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object on which the method was invoked, whose
- filter matches only elements that already match the filter of the <code><a href=#htmlallcollection>HTMLAllCollection</a></code>
- object on which the method was invoked and that are either:</p>
+ same <code><a href=#document>Document</a></code> as the <code><a href=#htmlallcollection>HTMLAllCollection</a></code> object on which the method was
+ invoked, whose filter matches only elements that are either:</p>
- <ul><li><a href=#all-named-elements>"all"-named elements</a> with a <code title="">name</code> attribute
+ <ul><!--CLEANUP--><!--2x--><li><a href=#all-named-elements>"all"-named elements</a> with a <code title="">name</code> attribute
equal to <var title="">name</var>, or,</li>
<li>elements with an <a href=#concept-id title=concept-id>ID</a> equal to <var title="">name</var>.</li>
Modified: source
===================================================================
--- source 2014-05-19 19:43:09 UTC (rev 8644)
+++ source 2014-05-20 16:59:49 UTC (rev 8645)
@@ -7039,16 +7039,22 @@
<h5>HTMLAllCollection</h5>
- <p>The <code>HTMLAllCollection</code> interface is used for generic <span>collections</span> of
- elements just like <code>HTMLCollection</code>, with the exception that its <code
+ <p>The <code>HTMLAllCollection</code> interface is used for the legacy <code
+ data-x="dom-document-all">document.all</code> attribute. It operates similarly to
+ <code>HTMLCollection</code>; the main differences are that its <code
data-x="dom-HTMLAllCollection-namedItem">namedItem()</code> method returns an
<code>HTMLCollection</code> object when there are multiple matching elements, and that its <code
data-x="dom-HTMLAllCollection-item">item()</code> method can be used as a synonym for its <code
- data-x="dom-HTMLAllCollection-namedItem">namedItem()</code> method. It is intended only for the
- legacy <code data-x="dom-document-all">document.all</code> attribute.</p>
+ data-x="dom-HTMLAllCollection-namedItem">namedItem()</code> method.</p>
+ <p class="note">All <code>HTMLAllCollection</code> objects are rooted at a <code>Document</code>
+ and have a filter that matches all elements, so the elements <span>represented by the
+ collection</span> of an <code>HTMLAllCollection</code> object consist of all the descendant
+ elements of the root <code>Document</code>.</p>
+
<pre class="idl">interface <dfn>HTMLAllCollection</dfn> : <span>HTMLCollection</span> {
- // inherits <span data-x="dom-HTMLCollection-length">length</span> and <span data-x="dom-HTMLCollection-item">item</span>(unsigned long index)
+ // inherits <span data-x="dom-HTMLCollection-length">length</span> and 'getter'
+ <span>Element</span>? <span data-x="dom-HTMLAllCollection-item">item</span>(unsigned long index);
(<span>HTMLCollection</span> or <span>Element</span>)? <span data-x="dom-HTMLAllCollection-item-string">item</span>(DOMString name);
legacycaller getter (<span>HTMLCollection</span> or <span>Element</span>)? <span data-x="dom-HTMLAllCollection-namedItem">namedItem</span>(DOMString name); // shadows inherited namedItem()
};</pre>
@@ -7060,7 +7066,7 @@
<p>Returns the number of elements in the collection.</p>
</dd>
- <dt><var data-x="">element</var> = <var data-x="">collection</var> . <code data-x="dom-HTMLCollection-item">item</code>(<var data-x="">index</var>)</dt>
+ <dt><var data-x="">element</var> = <var data-x="">collection</var> . <code data-x="dom-HTMLAllCollection-item">item</code>(<var data-x="">index</var>)</dt>
<dt><var data-x="">collection</var>[<var data-x="">index</var>]</dt>
<dd>
<p>Returns the item with index <var data-x="">index</var> from the collection. The items are sorted in <span>tree order</span>.</p>
@@ -7090,6 +7096,10 @@
<p>The object's <span>supported property indices</span> are as defined for
<code>HTMLCollection</code> objects.</p>
+ <p>The <dfn data-x="dom-HTMLAllCollection-item"><code>item()</code></dfn> method, when invoked
+ with a numeric argument, must act like the <span data-x="dom-HTMLCollection-item">item()</span>
+ method inherited from <code>HTMLCollection</code>.</p>
+
<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2837 -->
<p>The following elements are <dfn>"all"-named elements</dfn>:
<code>a</code>, <!-- in some browsers -->
@@ -7132,11 +7142,11 @@
<li>
<p>Let <var data-x="">collection</var> be an <code>HTMLCollection</code> object rooted at the
- same node as the <code>HTMLAllCollection</code> object on which the method was invoked, whose
- filter matches only elements that already match the filter of the <code>HTMLAllCollection</code>
- object on which the method was invoked and that are either:</p>
+ same <code>Document</code> as the <code>HTMLAllCollection</code> object on which the method was
+ invoked, whose filter matches only elements that are either:</p>
<ul>
+<!--CLEANUP--><!--2x-->
<li><span>"all"-named elements</span> with a <code data-x="">name</code> attribute
equal to <var data-x="">name</var>, or,</li>
More information about the Commit-Watchers
mailing list