document.all (bug 6766) (whatwg r3155)

document.all (bug 6766) (whatwg r3155)
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6766

Diffs for this change per section: 
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#dom-htmlcollection-tags
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#htmlcollection-0
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#htmlcollection
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#status-of-this-document
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#represented-by-the-collection
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#dom-document-alinkcolor
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#dom-htmlcollection-nameditem
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#a-vocabulary-and-associated-apis-for-html-and-xhtml
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#editor-s-draft-date-1-january-1970
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#conformance-checkers-0
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#dom-document-fgcolor
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#dom-document-all
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#dom-body-vlink
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2310.html#htmlformcontrolscollection

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2309&r2=1.2310&f=h
http://html5.org/tools/web-apps-tracker?from=3154&to=3155

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2309
retrieving revision 1.2310
diff -u -d -r1.2309 -r1.2310
--- Overview.html 30 May 2009 22:41:15 -0000 1.2309
+++ Overview.html 31 May 2009 08:45:28 -0000 1.2310
@@ -152,7 +152,7 @@
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
    <!--ZZZ:-->
    <!--<h2 class="no-num no-toc">W3C Working Draft 23 April 2009</h2>-->
-   <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 30 May 2009</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 31 May 2009</h2>
    <!--:ZZZ-->
    <dl><!-- ZZZ: update the month/day (twice), (un)comment out
     <dt>This Version:</dt>
@@ -245,7 +245,7 @@
   track.
   <!--ZZZ:-->
   <!--This specification is the 23 April 2009 Working Draft.-->
-  This specification is the 30 May 2009 Editor's Draft.
+  This specification is the 31 May 2009 Editor's Draft.
   <!--:ZZZ-->
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href="http://www.whatwg.org/">WHATWG</a>. The two specifications are
   identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of)
@@ -5623,11 +5623,12 @@
   object every time it is retrieved.</p>
 
   </div><h5 id="htmlcollection"><span class="secno">2.9.2.1 </span>HTMLCollection</h5><p>The <code><a href="#htmlcollection-0">HTMLCollection</a></code> interface represents a generic
-  <a href="#collections-0" title="collections">collection</a> of elements.<pre class="idl">[Callable=<a href="#dom-htmlcollection-nameditem" title="dom-HTMLCollection-namedItem">namedItem</a>]
+  <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>
    <dd>
     <p>Returns the number of elements in the collection.</p>
@@ -5654,6 +5655,11 @@
     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
@@ -5693,6 +5699,14 @@
   </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><h5 id="htmlformcontrolscollection"><span class="secno">2.9.2.2 </span>HTMLFormControlsCollection</h5><p>The <code><a href="#htmlformcontrolscollection-0">HTMLFormControlsCollection</a></code> interface represents
   a <a href="#collections-0" title="collections">collection</a> of <a href="#category-listed" title="category-listed">listed</a> elements in <code><a href="#the-form-element">form</a></code>
   and <code><a href="#the-fieldset-element">fieldset</a></code> elements.<pre class="idl">[Callable=<a href="#dom-htmlformcontrolscollection-nameditem" title="dom-HTMLFormControlsCollection-namedItem">namedItem</a>]
@@ -64240,6 +64254,8 @@
            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>
@@ -64271,6 +64287,19 @@
   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="#references">[ECMA262]</a></p>
 
 
   <h3 id="conformance-checkers-0"><span class="secno">12.4 </span>Conformance checkers</h3>

Received on Sunday, 31 May 2009 08:48:52 UTC