Skip to content

Commit

Permalink
[] (0) document.all (bug 6766)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3155 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 31, 2009
1 parent f85a1db commit 906460a
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
32 changes: 31 additions & 1 deletion index
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<div class=head>
<p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<h1>HTML 5</h1>
<h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 30 May 2009</h2>
<h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 31 May 2009</h2>
<p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<dl><dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -6179,11 +6179,13 @@
<p>The <code><a href=#htmlcollection-0>HTMLCollection</a></code> interface represents a generic
<a href=#collections-0 title=collections>collection</a> of elements.</p>

<!-- XXX IE does [Callable] with magic that calls item() or namedItem() as appropriate as if it were a regular [[Get]] -->
<pre class=idl>[Callable=<a href=#dom-htmlcollection-nameditem title=dom-HTMLCollection-namedItem>namedItem</a>]
interface <dfn id=htmlcollection-0>HTMLCollection</dfn> {
readonly attribute unsigned long <a href=#dom-htmlcollection-length title=dom-HTMLCollection-length>length</a>;
[IndexGetter] Element <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>(in unsigned long index);
[NameGetter] Element <a href=#dom-htmlcollection-nameditem title=dom-HTMLCollection-namedItem>namedItem</a>(in DOMString name);
<a href=#htmlcollection-0>HTMLCollection</a> <a href=#dom-htmlcollection-tags title=dom-HTMLCollection-tags>tags</a>(in DOMString tagName);
};</pre>

<dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length><a href=#dom-htmlcollection-length>length</a></code></dt>
Expand Down Expand Up @@ -6212,6 +6214,11 @@ interface <dfn id=htmlcollection-0>HTMLCollection</dfn> {
this method; their name is given by the value of their <code title="">name</code> attribute.</p>
</dd>

<dt><var title="">collection</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-tags><a href=#dom-htmlcollection-tags>tags</a></code>(<var title="">tagName</var>)</dt>
<dd>
<p>Returns a collection that is a filtered view of the current collection, containing only elements with the given tag name.</p>
</dd>

</dl><div class=impl>

<hr><p>The object's <span>indices of the supported indexed
Expand Down Expand Up @@ -6251,6 +6258,14 @@ interface <dfn id=htmlcollection-0>HTMLCollection</dfn> {
</ul><p>If no such elements are found, then the method must return
null.</p>

<p>The <dfn id=dom-htmlcollection-tags title=dom-HTMLCollection-tags><code>tags(<var title="">tagName</var>)</code></dfn> method must return an
<code><a href=#htmlcollection-0>HTMLCollection</a></code> rooted at the same node as the
<code><a href=#htmlcollection-0>HTMLCollection</a></code> object on which the method was invoked,
whose filter matches only <a href=#html-elements>HTML elements</a> whose local
name is the <var title="">tagName</var> argument. In <a href=#html-documents>HTML
documents</a>, the argument must first be <a href=#converted-to-lowercase>converted to
lowercase</a>.</p>

</div>


Expand Down Expand Up @@ -70401,6 +70416,8 @@ S SPACER STRIKE TT U -->
attribute DOMString <a href=#dom-document-linkcolor title=dom-document-linkColor>linkColor</a>;
attribute DOMString <a href=#dom-document-vlinkcolor title=dom-document-vlinkColor>vlinkColor</a>;
attribute DOMString <a href=#dom-document-alinkcolor title=dom-document-alinkColor>alinkColor</a>;

readonly attribute <a href=#htmlcollection-0>HTMLCollection</a> <a href=#dom-document-all title=dom-document-all>all</a>;
};</pre>

<p>The <dfn id=dom-document-fgcolor title=dom-document-fgColor><code>fgColor</code></dfn>
Expand Down Expand Up @@ -70432,6 +70449,19 @@ S SPACER STRIKE TT U -->
element">body element</a>, the attributes must instead return the
empty string on getting and do nothing on setting.</p>

<hr><p>The <dfn id=dom-document-all title=dom-document-all><code>all</code></dfn>
attribute must return an <code><a href=#htmlcollection-0>HTMLCollection</a></code> rooted at the
<code>Document</code> node, whose filter matches all elements.</p>

<p>The user agent must act as if the ToBoolean() operator in
JavaScript converted the object returned for <code title=dom-document-all><a href=#dom-document-all>all</a></code> to the false value.</p>

<p class=note>This is a <a href=#willful-violation>willful violation</a> of the
JavaScript specification current at the time of writing (ECMAScript
edition 3). The JavaScript specification requires that the
ToBoolean() operator convert all objects to the true value. This
violation is motivated by a desire for compatibility with legacy
content. <a href=#refsECMA262>[ECMA262]</a></p>


<h3 id=conformance-checkers-0><span class=secno>12.4 </span>Conformance checkers</h3>
Expand Down
34 changes: 34 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -6049,11 +6049,13 @@
<p>The <code>HTMLCollection</code> interface represents a generic
<span title="collections">collection</span> of elements.</p>

<!-- XXX IE does [Callable] with magic that calls item() or namedItem() as appropriate as if it were a regular [[Get]] -->
<pre class="idl">[Callable=<span title="dom-HTMLCollection-namedItem">namedItem</span>]
interface <dfn>HTMLCollection</dfn> {
readonly attribute unsigned long <span title="dom-HTMLCollection-length">length</span>;
[IndexGetter] Element <span title="dom-HTMLCollection-item">item</span>(in unsigned long index);
[NameGetter] Element <span title="dom-HTMLCollection-namedItem">namedItem</span>(in DOMString name);
<span>HTMLCollection</span> <span title="dom-HTMLCollection-tags">tags</span>(in DOMString tagName);
};</pre>

<dl class="domintro">
Expand Down Expand Up @@ -6085,6 +6087,11 @@ interface <dfn>HTMLCollection</dfn> {
title="">name</code> attribute.</p>
</dd>

<dt><var title="">collection</var> = <var title="">collection</var> . <code title="dom-HTMLCollection-tags">tags</code>(<var title="">tagName</var>)</dt>
<dd>
<p>Returns a collection that is a filtered view of the current collection, containing only elements with the given tag name.</p>
</dd>

</dl>

<div class="impl">
Expand Down Expand Up @@ -6139,6 +6146,15 @@ interface <dfn>HTMLCollection</dfn> {
<p>If no such elements are found, then the method must return
null.</p>

<p>The <dfn title="dom-HTMLCollection-tags"><code>tags(<var
title="">tagName</var>)</code></dfn> method must return an
<code>HTMLCollection</code> rooted at the same node as the
<code>HTMLCollection</code> object on which the method was invoked,
whose filter matches only <span>HTML elements</span> whose local
name is the <var title="">tagName</var> argument. In <span>HTML
documents</span>, the argument must first be <span>converted to
lowercase</span>.</p>

</div>


Expand Down Expand Up @@ -83030,6 +83046,8 @@ S SPACER STRIKE TT U -->
attribute DOMString <span title="dom-document-linkColor">linkColor</span>;
attribute DOMString <span title="dom-document-vlinkColor">vlinkColor</span>;
attribute DOMString <span title="dom-document-alinkColor">alinkColor</span>;

readonly attribute <span>HTMLCollection</span> <span title="dom-document-all">all</span>;
};</pre>

<p>The <dfn title="dom-document-fgColor"><code>fgColor</code></dfn>
Expand Down Expand Up @@ -83061,6 +83079,22 @@ S SPACER STRIKE TT U -->
element">body element</span>, the attributes must instead return the
empty string on getting and do nothing on setting.</p>

<hr>

<p>The <dfn title="dom-document-all"><code>all</code></dfn>
attribute must return an <code>HTMLCollection</code> rooted at the
<code>Document</code> node, whose filter matches all elements.</p>

<p>The user agent must act as if the ToBoolean() operator in
JavaScript converted the object returned for <code
title="dom-document-all">all</code> to the false value.</p>

<p class="note">This is a <span>willful violation</span> of the
JavaScript specification current at the time of writing (ECMAScript
edition 3). The JavaScript specification requires that the
ToBoolean() operator convert all objects to the true value. This
violation is motivated by a desire for compatibility with legacy
content. <a href="#refsECMA262">[ECMA262]</a></p>


<h3>Conformance checkers</h3>
Expand Down

0 comments on commit 906460a

Please sign in to comment.