Skip to content

Commit

Permalink
[giow] (2) Allow getElementsByClassName() etc to cache results if des…
Browse files Browse the repository at this point in the history
…ired. (this can result in script-detectable cache-sensitive behaviour, but is a massive performance win. Let's hope nobody ever depends on this.)

git-svn-id: http://svn.whatwg.org/webapps@4856 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 17, 2010
1 parent 86c1cd6 commit 2f43b50
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 45 deletions.
30 changes: 15 additions & 15 deletions complete.html
Expand Up @@ -7497,23 +7497,23 @@ <h4 id=dom-tree-accessors><span class=secno>3.1.4 </span><dfn>DOM tree accessors
<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. A
new <code><a href=#nodelist>NodeList</a></code> object must be returned each time unless
the argument is the same as the last time the method was invoked on
this <code><a href=#document>Document</a></code> object, in which case the object must be
the same as the object returned by the previous call.</p>
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 live
<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. A new <code><a href=#nodelist>NodeList</a></code>
object must be returned each time unless the argument is the same as
the last time the method was invoked on this
<code><a href=#htmlelement>HTMLElement</a></code> object, in which case the object must be
the same as the object returned by the previous call.</p>
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>

Expand Down Expand Up @@ -48404,11 +48404,11 @@ <h3 id=microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</h3>
are no tokens specified in the argument, or if the argument is
missing, then the method must return a <code><a href=#nodelist>NodeList</a></code>
containing all the <a href=#top-level-microdata-items>top-level microdata items</a> in the
document. A new <code><a href=#nodelist>NodeList</a></code> object must be returned each
time unless the argument is the same as the last time the method was
invoked on this <code><a href=#document>Document</a></code> object, in which case the
object must be the same as the object returned by the previous
call.</p>
document.
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-itemscope title=dom-itemScope><code>itemScope</code></dfn> IDL
attribute on <a href=#html-elements>HTML elements</a> must <a href=#reflect>reflect</a>
Expand Down
30 changes: 15 additions & 15 deletions index
Expand Up @@ -7396,23 +7396,23 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
<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. A
new <code><a href=#nodelist>NodeList</a></code> object must be returned each time unless
the argument is the same as the last time the method was invoked on
this <code><a href=#document>Document</a></code> object, in which case the object must be
the same as the object returned by the previous call.</p>
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 live
<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. A new <code><a href=#nodelist>NodeList</a></code>
object must be returned each time unless the argument is the same as
the last time the method was invoked on this
<code><a href=#htmlelement>HTMLElement</a></code> object, in which case the object must be
the same as the object returned by the previous call.</p>
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>

Expand Down Expand Up @@ -48306,11 +48306,11 @@ document.body.appendChild(outer);</pre>
are no tokens specified in the argument, or if the argument is
missing, then the method must return a <code><a href=#nodelist>NodeList</a></code>
containing all the <a href=#top-level-microdata-items>top-level microdata items</a> in the
document. A new <code><a href=#nodelist>NodeList</a></code> object must be returned each
time unless the argument is the same as the last time the method was
invoked on this <code><a href=#document>Document</a></code> object, in which case the
object must be the same as the object returned by the previous
call.</p>
document.
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-itemscope title=dom-itemScope><code>itemScope</code></dfn> IDL
attribute on <a href=#html-elements>HTML elements</a> must <a href=#reflect>reflect</a>
Expand Down
30 changes: 15 additions & 15 deletions source
Expand Up @@ -7386,11 +7386,11 @@ interface <dfn>HTMLDocument</dfn> {
<code>NodeList</code>. If the document is in <span>quirks
mode</span>, then the comparisons for the classes must be done in an
<span>ASCII case-insensitive</span> manner, otherwise, the
comparisons must be done in a <span>case-sensitive</span> manner. A
new <code>NodeList</code> object must be returned each time unless
the argument is the same as the last time the method was invoked on
this <code>Document</code> object, in which case the object must be
the same as the object returned by the previous call.</p>
comparisons must be done in a <span>case-sensitive</span> manner.
When the method is invoked on a <code>Document</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>NodeList</code> object must be returned.</p>

<p>The <dfn
title="dom-getElementsByClassName"><code>getElementsByClassName(<var
Expand All @@ -7401,11 +7401,11 @@ interface <dfn>HTMLDocument</dfn> {
title="dom-document-getElementsByClassName">getElementsByClassName()</code>
method would return when passed the same argument(s), excluding any
elements that are not descendants of the <code>HTMLElement</code>
object on which the method was invoked. A new <code>NodeList</code>
object must be returned each time unless the argument is the same as
the last time the method was invoked on this
<code>HTMLElement</code> object, in which case the object must be
the same as the object returned by the previous call.</p>
object on which the method was invoked.
When the method is invoked on an <code>HTMLElement</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>NodeList</code> object must be returned.</p>

</div>

Expand Down Expand Up @@ -53991,11 +53991,11 @@ document.body.appendChild(outer);</pre>
are no tokens specified in the argument, or if the argument is
missing, then the method must return a <code>NodeList</code>
containing all the <span>top-level microdata items</span> in the
document. A new <code>NodeList</code> object must be returned each
time unless the argument is the same as the last time the method was
invoked on this <code>Document</code> object, in which case the
object must be the same as the object returned by the previous
call.</p>
document.
When the method is invoked on a <code>Document</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>NodeList</code> object must be returned.</p>

<p>The <dfn title="dom-itemScope"><code>itemScope</code></dfn> IDL
attribute on <span>HTML elements</span> must <span>reflect</span>
Expand Down

0 comments on commit 2f43b50

Please sign in to comment.