Skip to content

Commit

Permalink
[giow] (0) Define whether these methods and attributes return the sam…
Browse files Browse the repository at this point in the history
…e object or a different object each time they are called.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8792

git-svn-id: http://svn.whatwg.org/webapps@4702 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 13, 2010
1 parent 1198f08 commit a41b513
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 54 deletions.
56 changes: 39 additions & 17 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -7397,7 +7397,11 @@ <h4 id=dom-tree-accessors><span class=secno>3.1.4 </span><dfn>DOM tree accessors
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
Expand All @@ -7410,16 +7414,23 @@ <h4 id=dom-tree-accessors><span class=secno>3.1.4 </span><dfn>DOM tree accessors
<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
<code>NodeList</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.</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>

Expand Down Expand Up @@ -8327,7 +8338,8 @@ <h5 id=the-style-attribute><span class=secno>3.2.3.7 </span>The <dfn title=attr-
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>

Expand Down Expand Up @@ -8453,7 +8465,9 @@ <h5 id=embedding-custom-non-visible-data><span class=secno>3.2.3.8 </span><dfn>E

</ol></dd>

</dl></div>
</dl><p>The same object must be returned each time.</p>

</div>

<div class=example>

Expand Down Expand Up @@ -12302,7 +12316,9 @@ <h4 id=styling><span class=secno>4.2.7 </span><dfn title="styling processing mod
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
Expand Down Expand Up @@ -44565,17 +44581,17 @@ <h5 id=stream-api><span class=secno>4.11.6.1 </span>Stream API</h5>
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
Expand Down Expand Up @@ -47557,7 +47573,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>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>
Expand Down Expand Up @@ -61412,10 +61432,12 @@ <h4 id=the-dragevent-and-datatransfer-interfaces><span class=secno>8.9.2 </span>
<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
Expand Down
56 changes: 39 additions & 17 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -7296,7 +7296,11 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
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
Expand All @@ -7309,16 +7313,23 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
<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
<code>NodeList</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.</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>

Expand Down Expand Up @@ -8226,7 +8237,8 @@ Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre>
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>

Expand Down Expand Up @@ -8352,7 +8364,9 @@ background: transparent"&gt;blue&lt;/span&gt;.&lt;/p&gt;</pre>

</ol></dd>

</dl></div>
</dl><p>The same object must be returned each time.</p>

</div>

<div class=example>

Expand Down Expand Up @@ -12201,7 +12215,9 @@ c-end = "--&gt;"</pre>
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
Expand Down Expand Up @@ -44464,17 +44480,17 @@ interface <dfn>DataGridListener</dfn> {
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
Expand Down Expand Up @@ -47456,7 +47472,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 <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>
Expand Down Expand Up @@ -61328,10 +61348,12 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {
<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
Expand Down
Loading

0 comments on commit a41b513

Please sign in to comment.