Skip to content

Commit

Permalink
[e] (0) xref getElementById()
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=9200

git-svn-id: http://svn.whatwg.org/webapps@4907 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 30, 2010
1 parent ef7d8d1 commit 5b7205a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 46 deletions.
29 changes: 13 additions & 16 deletions complete.html
Expand Up @@ -3066,6 +3066,7 @@ <h4 id=dependencies><span class=secno>2.2.1 </span>Dependencies</h4>
<li><dfn id=element><code>Element</code></dfn></li>
<li><dfn id=nodelist><code>NodeList</code></dfn></li>
<li><dfn id=textcontent><code>textContent</code></dfn></li>
<li><dfn id=getelementbyid()><code>getElementById()</code></dfn></li>
</ul><p>The following features are defined in the DOM Events
specification: <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
<ul class=brief><li><dfn id=event><code>Event</code></dfn></li>
Expand Down Expand Up @@ -6216,9 +6217,9 @@ <h4 id=reflecting-content-attributes-in-idl-attributes><span class=secno>2.7.1 <
<ol><li>If the corresponding content attribute is absent, then the
IDL attribute must return null.</li>

<li>Let <var title="">candidate</var> be the element that the <code title="">document.getElementById()</code> method would find if it
was passed as its argument the current value of the corresponding
content attribute.</li>
<li>Let <var title="">candidate</var> be the element that the <code title=getElementById()><a href=#getelementbyid()>document.getElementById()</a></code> method
would find if it was passed as its argument the current value of
the corresponding content attribute.</li>

<li>If <var title="">candidate</var> is null, or if it is not
type-compatible with the IDL attribute, then the IDL attribute must
Expand Down Expand Up @@ -8068,20 +8069,16 @@ <h4 id=dom-tree-accessors><span class=secno>3.1.4 </span><dfn>DOM tree accessors
&lt;p id="p3" class="bbb ccc"/&gt;
&lt;/div&gt;</pre>

<p>A call to
<code>document.getElementById('example').getElementsByClassName('aaa')</code>
would return a <code><a href=#nodelist>NodeList</a></code> with the two paragraphs
<code>p1</code> and <code>p2</code> in it.</p>
<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>getElementsByClassName('ccc&nbsp;bbb')</code>
would only return one node, however, namely <code>p3</code>. A call
to
<code>document.getElementById('example').getElementsByClassName('bbb&nbsp;&nbsp;ccc&nbsp;')</code>
<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>getElementsByClassName('aaa,bbb')</code> would
return no nodes; none of the elements above are in the "aaa,bbb"
class.</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>

Expand Down Expand Up @@ -8644,7 +8641,7 @@ <h5 id=the-id-attribute><span class=secno>3.2.3.1 </span>The <dfn title=attr-id>
the element with the given value (exactly, including any space
characters) for the purposes of ID matching within the element's
<a href=#home-subtree>home subtree</a> (e.g. for selectors in CSS or for the
<code>getElementById()</code> method in the DOM).</p>
<code><a href=#getelementbyid()>getElementById()</a></code> method in the DOM).</p>

<p>Identifiers are opaque strings. Particular meanings should not be
derived from the value of the <code title=attr-id><a href=#the-id-attribute>id</a></code>
Expand Down Expand Up @@ -45218,7 +45215,7 @@ <h5 id=context-menus><span class=secno>4.11.4.3 </span><dfn>Context menus</dfn><
attribute gives the element's <a href=#context-menus title="context menus">context
menu</a>. The value must be the ID of a <code><a href=#menus>menu</a></code> element
in the DOM. <span class=impl>If the node that would be obtained by
the invoking the <code>getElementById()</code> method using the
the invoking the <code><a href=#getelementbyid()>getElementById()</a></code> method using the
attribute's value as the only argument is null or not a
<code><a href=#menus>menu</a></code> element, then the element has no assigned context
menu. Otherwise, the element's assigned context menu is the element
Expand Down
29 changes: 13 additions & 16 deletions index
Expand Up @@ -2964,6 +2964,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn id=element><code>Element</code></dfn></li>
<li><dfn id=nodelist><code>NodeList</code></dfn></li>
<li><dfn id=textcontent><code>textContent</code></dfn></li>
<li><dfn id=getelementbyid()><code>getElementById()</code></dfn></li>
</ul><p>The following features are defined in the DOM Events
specification: <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
<ul class=brief><li><dfn id=event><code>Event</code></dfn></li>
Expand Down Expand Up @@ -6114,9 +6115,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<ol><li>If the corresponding content attribute is absent, then the
IDL attribute must return null.</li>

<li>Let <var title="">candidate</var> be the element that the <code title="">document.getElementById()</code> method would find if it
was passed as its argument the current value of the corresponding
content attribute.</li>
<li>Let <var title="">candidate</var> be the element that the <code title=getElementById()><a href=#getelementbyid()>document.getElementById()</a></code> method
would find if it was passed as its argument the current value of
the corresponding content attribute.</li>

<li>If <var title="">candidate</var> is null, or if it is not
type-compatible with the IDL attribute, then the IDL attribute must
Expand Down Expand Up @@ -7966,20 +7967,16 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
&lt;p id="p3" class="bbb ccc"/&gt;
&lt;/div&gt;</pre>

<p>A call to
<code>document.getElementById('example').getElementsByClassName('aaa')</code>
would return a <code><a href=#nodelist>NodeList</a></code> with the two paragraphs
<code>p1</code> and <code>p2</code> in it.</p>
<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>getElementsByClassName('ccc&nbsp;bbb')</code>
would only return one node, however, namely <code>p3</code>. A call
to
<code>document.getElementById('example').getElementsByClassName('bbb&nbsp;&nbsp;ccc&nbsp;')</code>
<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>getElementsByClassName('aaa,bbb')</code> would
return no nodes; none of the elements above are in the "aaa,bbb"
class.</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>

Expand Down Expand Up @@ -8542,7 +8539,7 @@ interface <dfn id=htmlunknownelement>HTMLUnknownElement</dfn> : <a href=#htmlele
the element with the given value (exactly, including any space
characters) for the purposes of ID matching within the element's
<a href=#home-subtree>home subtree</a> (e.g. for selectors in CSS or for the
<code>getElementById()</code> method in the DOM).</p>
<code><a href=#getelementbyid()>getElementById()</a></code> method in the DOM).</p>

<p>Identifiers are opaque strings. Particular meanings should not be
derived from the value of the <code title=attr-id><a href=#the-id-attribute>id</a></code>
Expand Down Expand Up @@ -45119,7 +45116,7 @@ interface <dfn>DataGridListener</dfn> {
attribute gives the element's <a href=#context-menus title="context menus">context
menu</a>. The value must be the ID of a <code><a href=#menus>menu</a></code> element
in the DOM. <span class=impl>If the node that would be obtained by
the invoking the <code>getElementById()</code> method using the
the invoking the <code><a href=#getelementbyid()>getElementById()</a></code> method using the
attribute's value as the only argument is null or not a
<code><a href=#menus>menu</a></code> element, then the element has no assigned context
menu. Otherwise, the element's assigned context menu is the element
Expand Down
30 changes: 16 additions & 14 deletions source
Expand Up @@ -1979,6 +1979,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn><code>Element</code></dfn></li>
<li><dfn><code>NodeList</code></dfn></li>
<li><dfn><code>textContent</code></dfn></li>
<li><dfn><code>getElementById()</code></dfn></li>
</ul>

<p>The following features are defined in the DOM Events
Expand Down Expand Up @@ -5776,9 +5777,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
IDL attribute must return null.</li>

<li>Let <var title="">candidate</var> be the element that the <code
title="">document.getElementById()</code> method would find if it
was passed as its argument the current value of the corresponding
content attribute.</li>
title="getElementById()">document.getElementById()</code> method
would find if it was passed as its argument the current value of
the corresponding content attribute.</li>

<li>If <var title="">candidate</var> is null, or if it is not
type-compatible with the IDL attribute, then the IDL attribute must
Expand Down Expand Up @@ -7970,20 +7971,21 @@ interface <dfn>HTMLDocument</dfn> {
&lt;p id="p3" class="bbb ccc"/&gt;
&lt;/div&gt;</pre>

<p>A call to
<code>document.getElementById('example').getElementsByClassName('aaa')</code>
would return a <code>NodeList</code> with the two paragraphs
<code>p1</code> and <code>p2</code> in it.</p>
<p>A call to <code
title="">document.getElementById('example').getElementsByClassName('aaa')</code>
would return a <code>NodeList</code> with the two paragraphs <code
title="">p1</code> and <code title="">p2</code> in it.</p>

<p>A call to <code>getElementsByClassName('ccc&nbsp;bbb')</code>
would only return one node, however, namely <code>p3</code>. A call
to
<code>document.getElementById('example').getElementsByClassName('bbb&nbsp;&nbsp;ccc&nbsp;')</code>
<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>getElementsByClassName('aaa,bbb')</code> would
return no nodes; none of the elements above are in the "aaa,bbb"
class.</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>

Expand Down

0 comments on commit 5b7205a

Please sign in to comment.