[html5] r4856 - [giow] (2) Allow getElementsByClassName() etc to cache results if desired. (this [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Mar 17 16:23:59 PDT 2010
Author: ianh
Date: 2010-03-17 16:23:57 -0700 (Wed, 17 Mar 2010)
New Revision: 4856
Modified:
complete.html
index
source
Log:
[giow] (2) Allow getElementsByClassName() etc to cache results if desired. (this can result in script-detectable cache-sensitive behaviour, but is a massive performance win. Let's hope nobody ever depends on this.)
Modified: complete.html
===================================================================
--- complete.html 2010-03-17 23:10:52 UTC (rev 4855)
+++ complete.html 2010-03-17 23:23:57 UTC (rev 4856)
@@ -7497,11 +7497,11 @@
<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
@@ -7509,11 +7509,11 @@
<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>
@@ -48404,11 +48404,11 @@
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>
Modified: index
===================================================================
--- index 2010-03-17 23:10:52 UTC (rev 4855)
+++ index 2010-03-17 23:23:57 UTC (rev 4856)
@@ -7396,11 +7396,11 @@
<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
@@ -7408,11 +7408,11 @@
<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>
@@ -48306,11 +48306,11 @@
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>
Modified: source
===================================================================
--- source 2010-03-17 23:10:52 UTC (rev 4855)
+++ source 2010-03-17 23:23:57 UTC (rev 4856)
@@ -7386,11 +7386,11 @@
<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
@@ -7401,11 +7401,11 @@
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>
@@ -53991,11 +53991,11 @@
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>
More information about the Commit-Watchers
mailing list