HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
3155document.all (bug 6766)2009-05-31 08:45
@@ -6042,25 +6042,27 @@
   object every time it is retrieved.</p>
 
   </div>
 
 
   <h5>HTMLCollection</h5>
 
   <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">
 
    <dt><var title="">collection</var> . <code title="dom-HTMLCollection-length">length</code></dt>
    <dd>
     <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">item</code>(<var title="">index</var>)</dt>
@@ -6078,20 +6080,25 @@ interface <dfn>HTMLCollection</dfn> {
     from the collection.</p>
     <p>Returns null if no element with that ID or name could be found.</p>
     <p>Only <code>a</code>, <code>applet</code>, <code>area</code>,
     <code>embed</code>, <code>form</code>, <code>frame</code>,
     <code>frameset</code>, <code>iframe</code>, <code>img</code>, and
     <code>object</code> elements can have a name for the purpose of
     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">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">
 
   <hr>
 
   <p>The object's <span>indices of the supported indexed
   properties</span> are the numbers in the range zero to one less than
   the number of nodes <span>represented by the collection</span>. If
   there are no such elements, then there are no <span>supported
@@ -6132,20 +6139,29 @@ interface <dfn>HTMLCollection</dfn> {
    title="">name</code> attribute equal to <var title="">key</var>,
    or,</li>
 
    <li>It is an element with an ID <var title="">key</var>.</li>
 
   </ul>
 
   <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>
 
 
   <h5>HTMLFormControlsCollection</h5>
 
   <p>The <code>HTMLFormControlsCollection</code> interface represents
   a <span title="collections">collection</span> of <span
   title="category-listed">listed</span> elements in <code>form</code>
   and <code>fieldset</code> elements.</p>
 
@@ -83023,20 +83039,22 @@ S SPACER STRIKE TT U -->
   attribute of the <code>body</code> element must <span>reflect</span>
   the element's <code title="attr-body-vlink">vlink</code> content
   attribute.</p>
 
   <pre class="idl">[XXX] interface <span>HTMLDocument</span> {
            attribute DOMString <span title="dom-document-fgColor">fgColor</span>;
            attribute DOMString <span title="dom-document-bgColor">bgColor</span>;
            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>
   attribute on the <code>Document</code> object must
   <span>reflect</span> the <code title="attr-body-text">text</code>
   attribute on <span>the body element</span>.</p>
 
   <p>The <dfn title="dom-document-bgColor"><code>bgColor</code></dfn>
   attribute on the <code>Document</code> object must
   <span>reflect</span> the <code title="attr-body-bgcolor">bgcolor</code>
@@ -83054,20 +83072,36 @@ S SPACER STRIKE TT U -->
 
   <p>The <dfn title="dom-document-aLinkColor"><code>aLinkColor</code></dfn>
   attribute on the <code>Document</code> object must
   <span>reflect</span> the <code title="attr-body-alink">alink</code>
   attribute on <span>the body element</span>.</p>
 
   <p>For the above attributes, when there is no <span title="the body
   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
   language defined in <em>this</em> specification, conformance
   checkers are encouraged to categorize errors that represent usage of
   old obsolete features that generally have no effect (as defined
   below) into a separate part of their report, to allow authors to
   distinguish between likely mistakes and mere vestigial markup.</p>

|