Skip to content

Commit

Permalink
[e] (0) Fix meaning of 'live' throughout. Hide a Window object that h…
Browse files Browse the repository at this point in the history
…ad leaked out instead of turning into a WindowProxy object. Fix a note that had rotted.

git-svn-id: http://svn.whatwg.org/webapps@4857 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 17, 2010
1 parent 2f43b50 commit d2b51b9
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 197 deletions.
124 changes: 59 additions & 65 deletions complete.html
Expand Up @@ -2107,11 +2107,10 @@ <h4 id=scripting-0><span class=secno>2.1.4 </span>Scripting</h4>
be <dfn title="">setting</dfn> when a new value is assigned to
it.</p>

<p>If a DOM object is said to be <dfn id=live>live</dfn>, then that means
that any attributes returning that object <span class=impl>must</span> always return the same object (not a new
object each time), and the attributes and methods on that object
<span class=impl>must</span> operate on the actual underlying
data, not a snapshot of the data.</p>
<p>If a DOM object is said to be <dfn id=live>live</dfn>, then the
attributes and methods on that object <span class=impl>must</span>
operate on the actual underlying data, not a snapshot of the
data.</p>

<p>The terms <dfn title="">fire</dfn> and <dfn title="">dispatch</dfn> are used interchangeably in the context of
events, as in the DOM Events specifications. The term <dfn id=concept-events-trusted title=concept-events-trusted>trusted event</dfn> is used as
Expand Down Expand Up @@ -5974,8 +5973,8 @@ <h5 id=htmlformcontrolscollection-0><span class=secno>2.7.2.3 </span>HTMLFormCon
<li>Otherwise, if there are no nodes in the collection that have
either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute equal to <var title="">name</var>, then return null and stop the algorithm.</li>

<li>Otherwise, create a <code><a href=#radionodelist>RadioNodeList</a></code> object
representing a live view of the
<li>Otherwise, create a new <code><a href=#radionodelist>RadioNodeList</a></code> object
representing a <a href=#live>live</a> view of the
<code><a href=#htmlformcontrolscollection>HTMLFormControlsCollection</a></code> object, further filtered so
that the only nodes in the <code><a href=#radionodelist>RadioNodeList</a></code> object are
those that have either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute
Expand Down Expand Up @@ -6129,14 +6128,12 @@ <h5 id=htmloptionscollection-0><span class=secno>2.7.2.4 </span>HTMLOptionsColle
either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name>name</code> attribute equal to <var title="">name</var>, then return null and stop the algorithm.</li>

<!-- IE returns an HTMLCollection instead; we may need to change to that for compat -->
<li>Otherwise, create a <code><a href=#nodelist>NodeList</a></code> object representing a
live view of the <code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> object, further
filtered so that the only nodes in the <code><a href=#nodelist>NodeList</a></code> object
are those that have either an <code title=attr-id><a href=#the-id-attribute>id</a></code>
attribute or a <code title=attr-option-name>name</code> attribute
equal to <var title="">name</var>. The nodes in the
<code><a href=#nodelist>NodeList</a></code> object must be sorted in <a href=#tree-order>tree
order</a>.</li>
<li>Otherwise, create a new <code><a href=#nodelist>NodeList</a></code> object
representing a <a href=#live>live</a> view of the
<code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> object, further filtered so that
the only nodes in the <code><a href=#nodelist>NodeList</a></code> object are those that
have either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name>name</code> attribute equal to <var title="">name</var>. The nodes in the <code><a href=#nodelist>NodeList</a></code> object
must be sorted in <a href=#tree-order>tree order</a>.</li>

<li>Return that <code><a href=#nodelist>NodeList</a></code> object.</li>

Expand Down Expand Up @@ -6249,22 +6246,20 @@ <h5 id=htmlpropertiescollection-0><span class=secno>2.7.2.5 </span>HTMLPropertie
<a href=#represented-by-the-collection>represented by the collection</a>.</p>

<p>The <dfn id=dom-htmlpropertiescollection-names title=dom-HTMLPropertiesCollection-names><code>names</code></dfn>
attribute must return a live <code>DOMStringList</code> object
giving the <a href=#property-names>property names</a> of all the elements
attribute must return a <a href=#live>live</a> <code>DOMStringList</code>
object giving the <a href=#property-names>property names</a> of all the elements
<a href=#represented-by-the-collection>represented by the collection</a>, listed in <a href=#tree-order>tree
order</a>, but with duplicates removed, leaving only the first
occurrence of each name. The same object must be returned each
time.</p>

<p>The <dfn id=dom-htmlpropertiescollection-nameditem title=dom-HTMLPropertiesCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must return a
<code><a href=#propertynodelist>PropertyNodeList</a></code> object representing a live view of the
<code><a href=#htmlpropertiescollection>HTMLPropertiesCollection</a></code> object, further filtered so that
the only nodes in the <code><a href=#propertynodelist>PropertyNodeList</a></code> object are those
that have a <a href=#property-names title="property names">property name</a> equal
to <var title="">name</var>. The nodes in the
<code><a href=#propertynodelist>PropertyNodeList</a></code> object must be sorted in <a href=#tree-order>tree
order</a>, and the same object must be returned each time a
particular <var title="">name</var> is queried.</p>
<code><a href=#propertynodelist>PropertyNodeList</a></code> object representing a
<a href=#live>live</a> view of the <code><a href=#htmlpropertiescollection>HTMLPropertiesCollection</a></code>
object, further filtered so that the only nodes in the
<code><a href=#propertynodelist>PropertyNodeList</a></code> object are those that have a <a href=#property-names title="property names">property name</a> equal to <var title="">name</var>. The nodes in the <code><a href=#propertynodelist>PropertyNodeList</a></code>
object must be sorted in <a href=#tree-order>tree order</a>, and the same
object must be returned each time a particular <var title="">name</var> is queried.</p>

<hr><p>Members of the <code><a href=#propertynodelist>PropertyNodeList</a></code> interface inherited
from the <code><a href=#nodelist>NodeList</a></code> interface must behave as they would
Expand Down Expand Up @@ -7476,19 +7471,19 @@ <h4 id=dom-tree-accessors><span class=secno>3.1.4 </span><dfn>DOM tree accessors

</dl><div class=impl>

<p>The <dfn id=dom-document-getelementsbyname title=dom-document-getElementsByName><code>getElementsByName(<var title="">name</var>)</code></dfn> method takes a string <var title="">name</var>, and must return a live <code><a href=#nodelist>NodeList</a></code>
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>. 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>
<p>The <dfn id=dom-document-getelementsbyname title=dom-document-getElementsByName><code>getElementsByName(<var title="">name</var>)</code></dfn> method takes a string <var title="">name</var>, and must return a <a href=#live>live</a>
<code><a href=#nodelist>NodeList</a></code> 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>.
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 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-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
classes. When called, the method must return a live
classes. When called, the method must return a <a href=#live>live</a>
<code><a href=#nodelist>NodeList</a></code> object containing all the elements in the
document, in <a href=#tree-order>tree order</a>, that have all the classes
specified in that argument, having obtained the classes by <a href=#split-a-string-on-spaces title="split a string on spaces">splitting a string on
Expand All @@ -7504,7 +7499,7 @@ <h4 id=dom-tree-accessors><span class=secno>3.1.4 </span><dfn>DOM tree accessors
<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=#htmlelement>HTMLElement</a></code> interface must return a <a href=#live>live</a>
<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
Expand Down Expand Up @@ -25603,9 +25598,9 @@ <h6 id=colors-and-styles><span class=secno>4.8.10.1.4 </span>Colors and styles</
value.</p>

<p>When set to a <code><a href=#canvaspattern>CanvasPattern</a></code> or
<code><a href=#canvasgradient>CanvasGradient</a></code> object, the assignment is live, meaning
that changes made to the object after the assignment do affect
subsequent stroking or filling of shapes.</p>
<code><a href=#canvasgradient>CanvasGradient</a></code> object, the assignment is
<a href=#live>live</a>, meaning that changes made to the object after the
assignment do affect subsequent stroking or filling of shapes.</p>

<p>On getting, if the value is a color, then the <a href=#serialization-of-a-color title="serialization of a color">serialization of the color</a>
must be returned. Otherwise, if it is not a color but a
Expand Down Expand Up @@ -28501,7 +28496,7 @@ <h5 id=processing-model><span class=secno>4.8.13.2 </span>Processing model</h5>
for an <code><a href=#the-area-element>area</a></code> element to correspond to multiple focusable
areas of the document.</p>

<p>Image maps are <em>live</em>; if the DOM is mutated, then the
<p>Image maps are <a href=#live>live</a>; if the DOM is mutated, then the
user agent must act as if it had rerun the algorithms for image
maps.</p>

Expand Down Expand Up @@ -40446,9 +40441,8 @@ <h5 id=the-constraint-validation-api><span class=secno>4.10.20.3 </span>The <dfn
<p>The <dfn id=dom-cva-validity title=dom-cva-validity><code>validity</code></dfn>
attribute must return a <code><a href=#validitystate>ValidityState</a></code> object that
represents the <a href=#validity-states>validity states</a> of the element. This
object is live, and the same object must be returned each time the
element's <code title=dom-cva-validity><a href=#dom-cva-validity>validity</a></code> attribute
is retrieved.</p>
object is <a href=#live>live</a>, and the same object must be returned
each time the element's <code title=dom-cva-validity><a href=#dom-cva-validity>validity</a></code> attribute is retrieved.</p>

<pre class=idl>interface <dfn id=validitystate>ValidityState</dfn> {
readonly attribute boolean <a href=#dom-validitystate-valuemissing title=dom-ValidityState-valueMissing>valueMissing</a>;
Expand Down Expand Up @@ -44849,8 +44843,8 @@ <h4 id=commands><span class=secno>4.11.5 </span>Commands</h4>
attribute must return a list containing the elements that can
trigger the command (the command's <span
title="command-facet-Triggers">Triggers</span>). The list must be
<span>live</span>. While the element does not define a command, the
list must be empty.</p>
<span>live</span>. The same object must be returned each time. While
the element does not define a command, the list must be empty.</p>
-->

<p class=note>The <a href=#command-facet-id title=command-facet-ID>ID</a> facet
Expand Down Expand Up @@ -48396,15 +48390,15 @@ <h3 id=microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</h3>
<p>The <dfn id=dom-document-getitems title=dom-document-getItems><code>document.getItems(<var title="">typeNames</var>)</code></dfn> method takes an optional
string that contains an <a href=#unordered-set-of-unique-space-separated-tokens>unordered set of unique
space-separated tokens</a> representing types. When called, the
method must return a live <code><a href=#nodelist>NodeList</a></code> object containing
all the elements in the document, in <a href=#tree-order>tree order</a>, that
are each <a href=#top-level-microdata-items>top-level microdata items</a> with a <a href=#item-type title="item type">type</a> equal to one of the types specified in
that argument, having obtained the types by <a href=#split-a-string-on-spaces title="split a
string on spaces">splitting the string on spaces</a>. If there
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.
method must return a <a href=#live>live</a> <code><a href=#nodelist>NodeList</a></code> object
containing all the elements in the document, in <a href=#tree-order>tree
order</a>, that are each <a href=#top-level-microdata-items>top-level microdata items</a>
with a <a href=#item-type title="item type">type</a> equal to one of the types
specified in that argument, having obtained the types by <a href=#split-a-string-on-spaces title="split a string on spaces">splitting the string on
spaces</a>. If there 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.
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
Expand Down Expand Up @@ -62436,8 +62430,8 @@ <h4 id=the-dragevent-and-datatransfer-interfaces><span class=secno>8.9.2 </span>
the last of those values that it was set to.</p>

<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
attribute must return a <a href=#live>live</a> <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. 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
Expand Down Expand Up @@ -70303,9 +70297,9 @@ <h4 id=posting-messages><span class=secno>10.4.3 </span>Posting messages</h4>
set to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an
origin">Unicode serialization</a> of the <a href=#origin>origin</a> of
the script that invoked the method, and the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be
set to the <a href="#script's-global-object">script's global object</a>.</p> <!--
invariant: the global object is always a Window if the script can
see this method -->
set to the <a href="#script's-global-object">script's global object</a>'s
<code><a href=#windowproxy>WindowProxy</a></code> object.</p> <!-- invariant: the global
object is always a Window if the script can see this method -->

</li>

Expand Down Expand Up @@ -70419,9 +70413,9 @@ <h4 id=posting-messages-with-message-ports><span class=secno>10.4.4 </span>Posti
set to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an
origin">Unicode serialization</a> of the <a href=#origin>origin</a> of
the script that invoked the method, and the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be
set to the <a href="#script's-global-object">script's global object</a>.</p> <!--
invariant: the global object is always a Window if the script can
see this method -->
set to the <a href="#script's-global-object">script's global object</a>'s
<code><a href=#windowproxy>WindowProxy</a></code> object.</p> <!-- invariant: the global
object is always a Window if the script can see this method -->

</li>

Expand All @@ -70441,9 +70435,9 @@ <h4 id=posting-messages-with-message-ports><span class=secno>10.4.4 </span>Posti

</li>

</ol><p class=note>These steps, with the exception of the second and
third steps and the penultimate step, are identical to those in the
previous section.</p>
</ol><p class=note>These steps, with the exception of the third,
fourth, and fifth steps and the penultimate step, are identical to
those in the previous section.</p>

<!-- v2: we can merge this section and the previous section when
implementations have shipped postMessage(). Anne asked that these
Expand Down

0 comments on commit d2b51b9

Please sign in to comment.