hixie: Move getElementsByClassName() to DOM Core. (whatwg r6331)

hixie: Move getElementsByClassName() to DOM Core. (whatwg r6331)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5058&r2=1.5059&f=h
http://html5.org/tools/web-apps-tracker?from=6330&to=6331

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5058
retrieving revision 1.5059
diff -u -d -r1.5058 -r1.5059
--- Overview.html 27 Jul 2011 00:00:57 -0000 1.5058
+++ Overview.html 27 Jul 2011 23:04:11 -0000 1.5059
@@ -318,7 +318,7 @@
 
    <h1>HTML5</h1>
    <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>
-   <h2 class="no-num no-toc" id="editor-s-draft-26-july-2011">Editor's Draft 26 July 2011</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-27-july-2011">Editor's Draft 27 July 2011</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -464,7 +464,7 @@
   Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation
   track.
-  This specification is the 26 July 2011 Editor's Draft.
+  This specification is the 27 July 2011 Editor's Draft.
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>Work on this specification is also done at the <a href="http://www.whatwg.org/">WHATWG</a>. The W3C HTML working group
   actively pursues convergence with the WHATWG, as required by the <a href="http://www.w3.org/2007/03/HTML-WG-charter">W3C HTML working
   group charter</a>.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
@@ -7391,7 +7391,6 @@
   readonly attribute <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-document-forms" title="dom-document-forms">forms</a>;
   readonly attribute <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-document-scripts" title="dom-document-scripts">scripts</a>;
   NodeList <a href="#dom-document-getelementsbyname" title="dom-document-getElementsByName">getElementsByName</a>(in DOMString elementName);
-  NodeList <a href="#dom-document-getelementsbyclassname" title="dom-document-getElementsByClassName">getElementsByClassName</a>(in DOMString classNames);
 
   // <a href="#dynamic-markup-insertion">dynamic markup insertion</a>
            attribute DOMString <a href="#dom-innerhtml" title="dom-innerHTML">innerHTML</a>;
@@ -7844,16 +7843,6 @@
     attribute with the value <var title="">name</var>.</p>
    </dd>
 
-   <dt><var title="">collection</var> = <var title="">document</var> . <code title="dom-document-getElementsByClassName"><a href="#dom-document-getelementsbyclassname">getElementsByClassName(<var title="">classes</var>)</a></code></dt>
-   <dt><var title="">collection</var> = <var title="">element</var> . <code title="dom-getElementsByClassName"><a href="#dom-getelementsbyclassname">getElementsByClassName(<var title="">classes</var>)</a></code></dt>
-   <dd>
-    <p>Returns a <code><a href="#nodelist">NodeList</a></code> of the elements in the object
-    on which the method was invoked (a <code><a href="#document">Document</a></code> or an
-    <code><a href="#element">Element</a></code>) that have all the classes given by <var title="">classes</var>.</p>
-    <p>The <var title="">classes</var> argument is interpreted as a
-    space-separated list of classes.</p>
-   </dd>
-
   </dl><div class="impl">
 
   <p>The <dfn id="dom-document-getelementsbyname" title="dom-document-getElementsByName"><code>getElementsByName(<var title="">name</var>)</code></dfn> method takes a string <var title="">name</var>, and must return a <a href="#live">live</a>
@@ -7866,60 +7855,6 @@
   object returned by the earlier call. In other cases, a new
   <code><a href="#nodelist">NodeList</a></code> object must be returned.</p>
 
-  <p>The <dfn id="dom-document-getelementsbyclassname" title="dom-document-getElementsByClassName"><code>getElementsByClassName(<var title="">classNames</var>)</code></dfn> method takes a string that
-  contains a <a href="#set-of-space-separated-tokens">set of space-separated tokens</a> representing
-  classes. When called, the method must return a <a href="#live">live</a>
-  <code><a href="#nodelist">NodeList</a></code> object containing all the elements in the
-  document, in <a href="#tree-order">tree order</a>, that have all the classes
-  specified in that argument, having obtained the classes by <a href="#split-a-string-on-spaces" title="split a string on spaces">splitting a string on
-  spaces</a>. (Duplicates are ignored.) If there are no tokens
-  specified in the argument, then the method must return an empty
-  <code><a href="#nodelist">NodeList</a></code>. If the document is in <a href="#quirks-mode">quirks
-  mode</a>, then the comparisons for the classes must be done in an
-  <a href="#ascii-case-insensitive">ASCII case-insensitive</a> manner, otherwise, the
-  comparisons must be done in a <a href="#case-sensitive">case-sensitive</a> manner.
-  When the method is invoked on a <code><a href="#document">Document</a></code> object again
-  with the same argument, the user agent may return the same object as
-  the object returned by the earlier call. In other cases, a new
-  <code><a href="#nodelist">NodeList</a></code> object must be returned.</p>
-
-  <p>The <dfn id="dom-getelementsbyclassname" title="dom-getElementsByClassName"><code>getElementsByClassName(<var title="">classNames</var>)</code></dfn> method on the
-  <code><a href="#htmlelement">HTMLElement</a></code> interface must return a <a href="#live">live</a>
-  <code><a href="#nodelist">NodeList</a></code> with the nodes that the
-  <code><a href="#htmldocument">HTMLDocument</a></code> <code title="dom-document-getElementsByClassName"><a href="#dom-document-getelementsbyclassname">getElementsByClassName()</a></code>
-  method would return when passed the same argument(s), excluding any
-  elements that are not descendants of the <code><a href="#htmlelement">HTMLElement</a></code>
-  object on which the method was invoked.
-  When the method is invoked on an <code><a href="#htmlelement">HTMLElement</a></code> object
-  again with the same argument, the user agent may return the same
-  object as the object returned by the earlier call. In other cases, a
-  new <code><a href="#nodelist">NodeList</a></code> object must be returned.</p>
-
-  </div><p>HTML, SVG, and MathML elements define which classes they are in
-  by having an attribute with no namespace with the name <code title="">class</code> containing a space-separated list of classes
-  to which the element belongs. Other specifications may also allow
-  elements in their namespaces to be labeled as being in specific
-  classes.<div class="example">
-
-   <p>Given the following XHTML fragment:</p>
-
-   <pre>&lt;div id="example"&gt;
- &lt;p id="p1" class="aaa bbb"/&gt;
- &lt;p id="p2" class="aaa ccc"/&gt;
- &lt;p id="p3" class="bbb ccc"/&gt;
-&lt;/div&gt;</pre>
-
-   <p>A call to <code title="">document.getElementById('example').getElementsByClassName('aaa')</code>
-   would return a <code><a href="#nodelist">NodeList</a></code> with the two paragraphs <code title="">p1</code> and <code title="">p2</code> in it.</p>
-
-   <p>A call to <code title="">getElementsByClassName('ccc&nbsp;bbb')</code> would only
-   return one node, however, namely <code title="">p3</code>. A call
-   to <code title="">document.getElementById('example').getElementsByClassName('bbb&nbsp;&nbsp;ccc&nbsp;')</code>
-   would return the same thing.</p>
-
-   <p>A call to <code title="">getElementsByClassName('aaa,bbb')</code> would return no
-   nodes; none of the elements above are in the "aaa,bbb" class.</p>
-
   </div><div class="impl">
 
   <hr><p>The <code><a href="#htmldocument">HTMLDocument</a></code> interface <span title="support
@@ -8232,9 +8167,6 @@
   elements</a>' interfaces inherit, <span class="impl">and which
   must be used by elements that have no additional
   requirements,</span> is the <code><a href="#htmlelement">HTMLElement</a></code> interface.<pre class="idl">interface <dfn id="htmlelement">HTMLElement</dfn> : <a href="#element">Element</a> {
-  // <a href="#dom-tree-accessors">DOM tree accessors</a>
-  NodeList <a href="#dom-getelementsbyclassname" title="dom-getElementsByClassName">getElementsByClassName</a>(in DOMString classNames);
-
   // <a href="#dynamic-markup-insertion">dynamic markup insertion</a>
            attribute DOMString <a href="#dom-innerhtml" title="dom-innerHTML">innerHTML</a>;
            attribute DOMString <a href="#dom-outerhtml" title="dom-outerHTML">outerHTML</a>;
@@ -8773,7 +8705,7 @@
   spaces</a>. (Duplicates are ignored.)</p>
 
   </div><p class="note">Assigning classes to an element affects class
-  matching in selectors in CSS, the <code title="dom-document-getElementsByClassName"><a href="#dom-document-getelementsbyclassname">getElementsByClassName()</a></code>
+  matching in selectors in CSS, the <code title="dom-document-getElementsByClassName">getElementsByClassName()</code>
   method in the DOM, and other such features.<p>There are no additional restrictions on the tokens authors can
   use in the <code title="attr-class"><a href="#classes">class</a></code> attribute, but
   authors are encouraged to use values that describe the nature of the

Received on Wednesday, 27 July 2011 23:04:39 UTC