[html5] r4702 - [giow] (0) Define whether these methods and attributes return the same object or [...]

whatwg at whatwg.org whatwg at whatwg.org
Sat Feb 13 03:26:13 PST 2010


Author: ianh
Date: 2010-02-13 03:26:10 -0800 (Sat, 13 Feb 2010)
New Revision: 4702

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Define whether these methods and attributes return the same object or a different object each time they are called.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8792

Modified: complete.html
===================================================================
--- complete.html	2010-02-13 11:03:27 UTC (rev 4701)
+++ complete.html	2010-02-13 11:26:10 UTC (rev 4702)
@@ -7397,7 +7397,11 @@
   containing all the <a href=#html-elements>HTML elements</a> in that document that
   have a <code title="">name</code> attribute whose value is equal to
   the <var title="">name</var> argument (in a
-  <a href=#case-sensitive>case-sensitive</a> manner), in <a href=#tree-order>tree order</a>.</p>
+  <a href=#case-sensitive>case-sensitive</a> manner), in <a href=#tree-order>tree order</a>. 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>
 
   <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
@@ -7410,8 +7414,11 @@
   <code>NodeList</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.</p>
+  comparisons must be done in a <a href=#case-sensitive>case-sensitive</a> 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>
 
   <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
@@ -7419,7 +7426,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.</p>
+  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><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>
 
   </div>
 
@@ -8327,7 +8338,8 @@
   create a <code title=attr-style><a href=#the-style-attribute>style</a></code> attribute on the
   element (if there isn't one already) and then change its value to be
   a value representing the serialized form of the
-  <code>CSSStyleDeclaration</code> object. <a href=#refsCSSOM>[CSSOM]</a>
+  <code>CSSStyleDeclaration</code> object. The same object must be
+  returned each time. <a href=#refsCSSOM>[CSSOM]</a></p>
 
   </div>
 
@@ -8453,8 +8465,10 @@
 
     </ol></dd>
 
-  </dl></div>
+  </dl><p>The same object must be returned each time.</p>
 
+  </div>
+
   <div class=example>
 
    <p>If a Web page wanted an element to represent a space ship,
@@ -12302,7 +12316,9 @@
    based on the other values)
 -->
 
-  </dl><p>The <dfn id=dom-linkstyle-disabled title=dom-LinkStyle-disabled><code>disabled</code></dfn> IDL
+  </dl><p>The same object must be returned each time.</p>
+
+  <p>The <dfn id=dom-linkstyle-disabled title=dom-LinkStyle-disabled><code>disabled</code></dfn> IDL
   attribute on <code><a href=#the-link-element>link</a></code> and <code><a href=#the-style-element>style</a></code> elements must
   return false and do nothing on setting, if the <code title=dom-linkstyle-sheet>sheet</code> attribute of their
   <code>LinkStyle</code> interface is null. Otherwise, it must return
@@ -44565,17 +44581,17 @@
   dimension, and bitrate in due course.</p>
 
   <p>When the <dfn id=dom-stream-record title=dom-stream-record><code>record()</code></dfn> method is
-  invoked, the user agent must return a <code><a href=#streamrecorder>StreamRecorder</a></code>
-  object associated with the stream.</p>
+  invoked, the user agent must return a new
+  <code><a href=#streamrecorder>StreamRecorder</a></code> object associated with the stream.</p>
 
   <pre class=idl>interface <dfn id=streamrecorder>StreamRecorder</dfn> {
   <span>File</span> <a href=#dom-streamrecorder-stop title=dom-StreamRecorder-stop>stop</a>();
 };</pre>
 
   <p>The <dfn id=dom-streamrecorder-stop title=dom-StreamRecorder-stop><code>stop()</code></dfn> method
-  must return a <code>File</code> object representing the data that
-  was streamed between the creation of the <code><a href=#streamrecorder>StreamRecorder</a></code>
-  object and the invocation of the <code title=dom-StreamRecorder-stop><a href=#dom-streamrecorder-stop>stop()</a></code> method. <a href=#refsFILEAPI>[FILEAPI]</a></p>
+  must return a new <code>File</code> object representing the data
+  that was streamed between the creation of the
+  <code><a href=#streamrecorder>StreamRecorder</a></code> object and the invocation of the <code title=dom-StreamRecorder-stop><a href=#dom-streamrecorder-stop>stop()</a></code> method. <a href=#refsFILEAPI>[FILEAPI]</a></p>
 
   <p>For audio and video streams, the file must be in a format
   supported by the user agent for use in <code><a href=#audio>audio</a></code> and
@@ -47557,7 +47573,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 <a href=#top-level-microdata-items>top-level microdata items</a> in the
-  document.</p>
+  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>
 
   <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>
@@ -61412,10 +61432,12 @@
   <p>The <dfn id=dom-datatransfer-types title=dom-DataTransfer-types><code>types</code></dfn>
   attribute must return a live <code>DOMStringList</code> that
   contains the list of formats that were added to the
-  <code><a href=#datatransfer>DataTransfer</a></code> object in the corresponding <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event.  If any files were
-  included in the drag, then the <code>DOMStringList</code> object
-  must in addition include the string "<code title="">Files</code>". (This value can be distinguished from the
-  other values because it is not lowercase.)</p>
+  <code><a href=#datatransfer>DataTransfer</a></code> object in the corresponding <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event. The same object must
+  be returned each time. If any files were included in the drag, then
+  the <code>DOMStringList</code> object must in addition include the
+  string "<code title="">Files</code>". (This value can be
+  distinguished from the other values because it is not
+  lowercase.)</p>
 
   <p>The <dfn id=dom-datatransfer-cleardata title=dom-DataTransfer-clearData><code>clearData()</code></dfn>
   method, when called with no arguments, must clear the

Modified: index
===================================================================
--- index	2010-02-13 11:03:27 UTC (rev 4701)
+++ index	2010-02-13 11:26:10 UTC (rev 4702)
@@ -7296,7 +7296,11 @@
   containing all the <a href=#html-elements>HTML elements</a> in that document that
   have a <code title="">name</code> attribute whose value is equal to
   the <var title="">name</var> argument (in a
-  <a href=#case-sensitive>case-sensitive</a> manner), in <a href=#tree-order>tree order</a>.</p>
+  <a href=#case-sensitive>case-sensitive</a> manner), in <a href=#tree-order>tree order</a>. 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>
 
   <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
@@ -7309,8 +7313,11 @@
   <code>NodeList</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.</p>
+  comparisons must be done in a <a href=#case-sensitive>case-sensitive</a> 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>
 
   <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
@@ -7318,7 +7325,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.</p>
+  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><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>
 
   </div>
 
@@ -8226,7 +8237,8 @@
   create a <code title=attr-style><a href=#the-style-attribute>style</a></code> attribute on the
   element (if there isn't one already) and then change its value to be
   a value representing the serialized form of the
-  <code>CSSStyleDeclaration</code> object. <a href=#refsCSSOM>[CSSOM]</a>
+  <code>CSSStyleDeclaration</code> object. The same object must be
+  returned each time. <a href=#refsCSSOM>[CSSOM]</a></p>
 
   </div>
 
@@ -8352,8 +8364,10 @@
 
     </ol></dd>
 
-  </dl></div>
+  </dl><p>The same object must be returned each time.</p>
 
+  </div>
+
   <div class=example>
 
    <p>If a Web page wanted an element to represent a space ship,
@@ -12201,7 +12215,9 @@
    based on the other values)
 -->
 
-  </dl><p>The <dfn id=dom-linkstyle-disabled title=dom-LinkStyle-disabled><code>disabled</code></dfn> IDL
+  </dl><p>The same object must be returned each time.</p>
+
+  <p>The <dfn id=dom-linkstyle-disabled title=dom-LinkStyle-disabled><code>disabled</code></dfn> IDL
   attribute on <code><a href=#the-link-element>link</a></code> and <code><a href=#the-style-element>style</a></code> elements must
   return false and do nothing on setting, if the <code title=dom-linkstyle-sheet>sheet</code> attribute of their
   <code>LinkStyle</code> interface is null. Otherwise, it must return
@@ -44464,17 +44480,17 @@
   dimension, and bitrate in due course.</p>
 
   <p>When the <dfn id=dom-stream-record title=dom-stream-record><code>record()</code></dfn> method is
-  invoked, the user agent must return a <code><a href=#streamrecorder>StreamRecorder</a></code>
-  object associated with the stream.</p>
+  invoked, the user agent must return a new
+  <code><a href=#streamrecorder>StreamRecorder</a></code> object associated with the stream.</p>
 
   <pre class=idl>interface <dfn id=streamrecorder>StreamRecorder</dfn> {
   <span>File</span> <a href=#dom-streamrecorder-stop title=dom-StreamRecorder-stop>stop</a>();
 };</pre>
 
   <p>The <dfn id=dom-streamrecorder-stop title=dom-StreamRecorder-stop><code>stop()</code></dfn> method
-  must return a <code>File</code> object representing the data that
-  was streamed between the creation of the <code><a href=#streamrecorder>StreamRecorder</a></code>
-  object and the invocation of the <code title=dom-StreamRecorder-stop><a href=#dom-streamrecorder-stop>stop()</a></code> method. <a href=#refsFILEAPI>[FILEAPI]</a></p>
+  must return a new <code>File</code> object representing the data
+  that was streamed between the creation of the
+  <code><a href=#streamrecorder>StreamRecorder</a></code> object and the invocation of the <code title=dom-StreamRecorder-stop><a href=#dom-streamrecorder-stop>stop()</a></code> method. <a href=#refsFILEAPI>[FILEAPI]</a></p>
 
   <p>For audio and video streams, the file must be in a format
   supported by the user agent for use in <code><a href=#audio>audio</a></code> and
@@ -47456,7 +47472,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 <a href=#top-level-microdata-items>top-level microdata items</a> in the
-  document.</p>
+  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>
 
   <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>
@@ -61328,10 +61348,12 @@
   <p>The <dfn id=dom-datatransfer-types title=dom-DataTransfer-types><code>types</code></dfn>
   attribute must return a live <code>DOMStringList</code> that
   contains the list of formats that were added to the
-  <code><a href=#datatransfer>DataTransfer</a></code> object in the corresponding <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event.  If any files were
-  included in the drag, then the <code>DOMStringList</code> object
-  must in addition include the string "<code title="">Files</code>". (This value can be distinguished from the
-  other values because it is not lowercase.)</p>
+  <code><a href=#datatransfer>DataTransfer</a></code> object in the corresponding <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event. The same object must
+  be returned each time. If any files were included in the drag, then
+  the <code>DOMStringList</code> object must in addition include the
+  string "<code title="">Files</code>". (This value can be
+  distinguished from the other values because it is not
+  lowercase.)</p>
 
   <p>The <dfn id=dom-datatransfer-cleardata title=dom-DataTransfer-clearData><code>clearData()</code></dfn>
   method, when called with no arguments, must clear the

Modified: source
===================================================================
--- source	2010-02-13 11:03:27 UTC (rev 4701)
+++ source	2010-02-13 11:26:10 UTC (rev 4702)
@@ -7276,7 +7276,11 @@
   containing all the <span>HTML elements</span> in that document that
   have a <code title="">name</code> attribute whose value is equal to
   the <var title="">name</var> argument (in a
-  <span>case-sensitive</span> manner), in <span>tree order</span>.</p>
+  <span>case-sensitive</span> manner), in <span>tree order</span>. 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>
 
   <p>The <dfn
   title="dom-document-getElementsByClassName"><code>getElementsByClassName(<var
@@ -7292,8 +7296,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.</p>
+  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>
 
   <p>The <dfn
   title="dom-getElementsByClassName"><code>getElementsByClassName(<var
@@ -7304,7 +7311,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.</p>
+  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>
 
   </div>
 
@@ -8310,8 +8321,8 @@
   create a <code title="attr-style">style</code> attribute on the
   element (if there isn't one already) and then change its value to be
   a value representing the serialized form of the
-  <code>CSSStyleDeclaration</code> object. <a
-  href="#refsCSSOM">[CSSOM]</a>
+  <code>CSSStyleDeclaration</code> object. The same object must be
+  returned each time. <a href="#refsCSSOM">[CSSOM]</a></p>
 
   </div>
 
@@ -8461,6 +8472,8 @@
 
   </dl>
 
+  <p>The same object must be returned each time.</p>
+
   </div>
 
   <div class="example">
@@ -12870,6 +12883,8 @@
 
   </dl>
 
+  <p>The same object must be returned each time.</p>
+
   <p>The <dfn
   title="dom-LinkStyle-disabled"><code>disabled</code></dfn> IDL
   attribute on <code>link</code> and <code>style</code> elements must
@@ -49565,8 +49580,8 @@
 
   <p>When the <dfn
   title="dom-stream-record"><code>record()</code></dfn> method is
-  invoked, the user agent must return a <code>StreamRecorder</code>
-  object associated with the stream.</p>
+  invoked, the user agent must return a new
+  <code>StreamRecorder</code> object associated with the stream.</p>
 
   <pre class="idl">interface <dfn>StreamRecorder</dfn> {
   <span>File</span> <span title="dom-StreamRecorder-stop">stop</span>();
@@ -49574,9 +49589,9 @@
 
   <p>The <dfn
   title="dom-StreamRecorder-stop"><code>stop()</code></dfn> method
-  must return a <code>File</code> object representing the data that
-  was streamed between the creation of the <code>StreamRecorder</code>
-  object and the invocation of the <code
+  must return a new <code>File</code> object representing the data
+  that was streamed between the creation of the
+  <code>StreamRecorder</code> object and the invocation of the <code
   title="dom-StreamRecorder-stop">stop()</code> method. <a
   href="#refsFILEAPI">[FILEAPI]</a></p>
 
@@ -53046,7 +53061,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.</p>
+  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>
 
   <p>The <dfn title="dom-itemScope"><code>itemScope</code></dfn> IDL
   attribute on <span>HTML elements</span> must <span>reflect</span>
@@ -69457,11 +69476,12 @@
   attribute must return a live <code>DOMStringList</code> that
   contains the list of formats that were added to the
   <code>DataTransfer</code> object in the corresponding <code
-  title="event-dragstart">dragstart</code> event.  If any files were
-  included in the drag, then the <code>DOMStringList</code> object
-  must in addition include the string "<code
-  title="">Files</code>". (This value can be distinguished from the
-  other values because it is not lowercase.)</p>
+  title="event-dragstart">dragstart</code> event. The same object must
+  be returned each time. If any files were included in the drag, then
+  the <code>DOMStringList</code> object must in addition include the
+  string "<code title="">Files</code>". (This value can be
+  distinguished from the other values because it is not
+  lowercase.)</p>
 
   <p>The <dfn
   title="dom-DataTransfer-clearData"><code>clearData()</code></dfn>
@@ -78961,9 +78981,10 @@
   <p>The <dfn title="dom-SQLResultSet-rows"><code>rows</code></dfn>
   attribute must return a <code>SQLResultSetRowList</code>
   representing the rows returned, in the order returned by the
-  database. If no rows were returned, then the object will be empty
-  (its <code title="dom-SQLResultSetRowList-length">length</code> will
-  be zero).</p>
+  database. The same object must be returned each time. If no rows
+  were returned, then the object will be empty (its <code
+  title="dom-SQLResultSetRowList-length">length</code> will be
+  zero).</p>
 
   <pre class="idl">interface <dfn>SQLResultSetRowList</dfn> {
   readonly attribute unsigned long <span title="dom-SQLResultSetRowList-length">length</span>;




More information about the Commit-Watchers mailing list