HTML Standard Tracker

Diff (omit for latest revision)

Short URL:

File a bug

SVNBugCommentTime (UTC)
3155document.all (bug 6766)2009-05-31 08:45
Index: source
--- source	(revision 3154)
+++ source	(revision 3155)
@@ -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);
   <dl class="domintro">
@@ -6085,6 +6087,11 @@
     title="">name</code> attribute.</p>
+   <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>
   <div class="impl">
@@ -6139,6 +6146,15 @@
   <p>If no such elements are found, then the method must return
+  <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>
@@ -83030,6 +83046,8 @@
            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>;
   <p>The <dfn title="dom-document-fgColor"><code>fgColor</code></dfn>
@@ -83061,8 +83079,24 @@
   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>
   <p>To ease the transition from HTML4 Transitional documents to the