Short URL: http://html5.org/r/2727
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 2727 | 2009-01-31 10:22 |
Index: source
===================================================================
--- source (revision 2726)
+++ source (revision 2727)
@@ -5816,9 +5816,9 @@
<div class="example">
- <p>For example, the <code>document.defaultView</code> attribute
- means that there is a strong reference from a <code>Document</code>
- object to its <code>Window</code> object. Similarly, there is
+ <p>For example, the <code>document.location</code> attribute means
+ that there is a strong reference from a <code>Document</code>
+ object to its <code>Location</code> object. Similarly, there is
always a strong reference from a <code>Document</code> to any
descendant nodes, and from any node to its owner
<code>Document</code>.</p>
@@ -5868,15 +5868,8 @@
<span title="HTML documents">HTML document</span> by calling <code
title="dom-document-open">document.open()</code> on it.</p>
- <p>When a <code>Document</code> is first created, a new <span>script
- group</span> must be created. This is the <code>Document</code>'s
- <dfn>current script group</dfn> until the script group is changed
- (which can happen if <code
- title="dom-document-open">document.open()</code> is invoked on the
- <code>Document</code>).</p>
-
<h4>Documents in the DOM</h4>
<p>All <code>Document</code> objects (in user agents implementing
@@ -5929,7 +5922,7 @@
// <span>dynamic markup insertion</span>
attribute DOMString <span title="dom-innerHTML">innerHTML</span>;
<span>HTMLDocument</span> <span title="dom-document-open">open</span>([Optional] in DOMString type, [Optional] in DOMString replace);
- <span>Window</span> <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features, [Optional] in boolean replace);
+ <span>WindowProxy</span> <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features, [Optional] in boolean replace);
void <span title="dom-document-close">close</span>();
void <span title="dom-document-write">write</span>([Variadic] in DOMString text);
void <span title="dom-document-writeln">writeln</span>([Variadic] in DOMString text);
@@ -6465,9 +6458,9 @@
<p>If <var title="">elements</var> has only one element, and that
element is an <code>iframe</code> element, then return the
- <code>Window</code> object of the <span>default view</span> of the
- <span>nested browsing context</span> represented by that
- <code>iframe</code> element, and abort these steps.</p>
+ <code>WindowProxy</code> object of the <span>nested browsing
+ context</span> represented by that <code>iframe</code> element,
+ and abort these steps.</p>
</li>
@@ -7898,23 +7891,24 @@
XHTML, or image document, or something?</span></p></li><!-- XXX see
also innerHTML in HTML -->
- <li><p>Freeze the document's <span>current script group</span>, as
- well as the <span>current script group</span> of any <span
- title="active document">active documents</span> in <span
- title="nested browsing context">nested browsing
- contexts</span>.</p></li>
-
<li><p>Unregister all event listeners registered on the
<code>Document</code> node and its descendants.</p>
<li><p>Remove all child nodes of the document, without firing any
mutation events.</p></li>
- <li><p>Create a new <span>script group</span> and let the
- document's <span>current script group</span> be that new
- group. (The old script group is now permanently frozen.)</p></li>
+ <li><p>Replace the <code>Document</code>'s singleton objects with
+ new instances of those objects. (This includes in particular the
+ <code>Window</code>, <code>Location</code>, <code>History</code>,
+ <code>ApplicationCache</code>, <code>UndoManager</code>,
+ <code>Navigator</code>, and <code>Selection</code> objects, the
+ various <code>BarProp</code> objects, the two <code>Storage</code>
+ objects, and the various <code>HTMLCollection</code> objects. It
+ also includes all the WebIDL prototypes in the ECMAScript binding,
+ including the <code>Document</code> object's prototype.)</p></li>
<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%20src%3D%22document%22%3E%3C%2Fiframe%3E%0A%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20f%20%3D%20document.getElementsByTagName('iframe')%5B0%5D%3B%20d%20%3D%20f.contentWindow.document%3B%20%7D%3C%2Fscript%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22w(d.documentElement.innerHTML)%22%20value%3D%22dump%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cscript%3Evar%20x%20%3D%20new%20XMLHttpRequest()%3Bx.open(%26quot%3BGET%26quot%3B%2C%20%26quot%3BGET%26quot%3B)%3Bx.onreadystatechange%3Dfunction()%20%7B%20alert(x.readyState)%3B%20%7D%3Bx.send(null)%3B%3C%2Fscript%3E')%3Bd.close()%3B%20setTimeout(function()%20%7B%20d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%20%7D%2C%200)%3B%22%20value%3D%22xhr%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.onclick%20%3D%20function()%20%7B%20w('click')%20%7D%22%20value%3D%22add%20click%20handler%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3E%3Cscript%3Ei%20%3D%200%3B%20setTimeout(%26quot%3Bparent.w(i%2B%2B)%26quot%3B%2C%202000)%3C%2Fscript%3E%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%20with%20timer%22%3E -->
+ <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A...%3Ciframe%3E%3C%2Fiframe%3E%0D%0A%3Cscript%3E%0D%0Aonload%20%3D%20function%20()%20%7B%0D%0A%20frames%5B0%5D.test%20%3D%201%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20var%20a%20%3D%20frames%5B0%5D.document.location.assign%3B%0D%0A%20w(a)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%20frames%5B0%5D.document.open()%3B%0D%0A%20frames%5B0%5D.document.write('%3Cscript%3Edocument.write(test)%3C%5C%2Fscript%3E')%3B%0D%0A%20frames%5B0%5D.document.close()%3B%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%7D%0D%0A%3C%2Fscript%3E -->
<li><p>Change the <span>document's character encoding</span> to
UTF-16.</p></li>
@@ -8005,15 +7999,11 @@
title="dom-document-open">open()</code> method on the
<code>HTMLDocument</code> object must call the <code
title="dom-open">open()</code> method on the <code>Window</code>
- interface of the object returned by the <code
- title="dom-document-defaultView">defaultView</code> attribute of the
- <code>DocumentView</code> interface of the <code>HTMLDocument</code>
- object, with the same arguments as the original call to the <code
+ object of the <code>HTMLDocument</code> object, with the same
+ arguments as the original call to the <code
title="dom-document-open">open()</code> method, and return whatever
- that method returned. If the <code
- title="dom-document-defaultView">defaultView</code> attribute of the
- <code>DocumentView</code> interface of the <code>HTMLDocument</code>
- object is null, then the method must raise an
+ that method returned. If the <code>HTMLDocument</code> object has no
+ <code>Window</code> object, then the method must raise an
<code>INVALID_ACCESS_ERR</code> exception.</p>
<p>The <dfn title="dom-document-close"><code>close()</code></dfn>
@@ -17164,7 +17154,7 @@
attribute DOMString <span title="dom-dim-height">height</span>;
<!-- XXX we should bring these back since the Window spec has atrophied
readonly attribute Document <span title="dom-iframe-contentDocument">contentDocument</span>;
- readonly attribute <span>Window</span> <span title="dom-iframe-contentWindow">contentWindow</span>;
+ readonly attribute <span>WindowProxy</span> <span title="dom-iframe-contentWindow">contentWindow</span>;
-->};</pre>
<p>Objects implementing the <code>HTMLIFrameElement</code>
interface must also implement the <code>EmbeddingElement</code>
@@ -17188,8 +17178,9 @@
<code>iframe</code> element's document's <span>browsing
context</span> as the <span>source browsing context</span>. If the
user <span title="navigate">navigates</span> away from this page,
- the <code>iframe</code>'s corresponding <code>Window</code> object
- will reference new <code>Document</code> objects, but the <code
+ the <code>iframe</code>'s corresponding <code>WindowProxy</code>
+ object will proxy new <code>Window</code> objects for new
+ <code>Document</code> objects, but the <code
title="attr-iframe-src">src</code> attribute will not change.</p>
<p>Whenever the <code title="attr-iframe-src">src</code> attribute
@@ -17835,10 +17826,11 @@
attribute DOMString <span title="dom-object-useMap">useMap</span>;
readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
attribute DOMString <span title="dom-dim-width">width</span>;
- attribute DOMString <span title="dom-dim-height">height</span>;<!-- XXX
+ attribute DOMString <span title="dom-dim-height">height</span>;
+<!-- XXX we should bring these back since the Window spec has atrophied
readonly attribute Document <span title="dom-object-contentDocument">contentDocument</span>;
- readonly attribute <span>Window</span> <span title="dom-object-contentWindow">contentWindow</span>;-->
-};</pre>
+ readonly attribute <span>WindowProxy</span> <span title="dom-object-contentWindow">contentWindow</span>;
+-->};</pre>
<p>Objects implementing the <code>HTMLObjectElement</code>
interface must also implement the <code>EmbeddingElement</code>
interface defined in the Window Object specification. <a
@@ -37624,28 +37616,43 @@
requirements defined in this section <em>do</em> apply to all user
agents, whether they are Web browsers or not.</p>
+
<h3 id="windows">Browsing contexts</h3>
- <p>A <dfn>browsing context</dfn> is a collection of one or more
- <code>Document</code> objects, and one or more <span
- title="view">views</span>.</p>
+ <p>A <dfn>browsing context</dfn> is an environment in which
+ <code>Document</code> objects are presented to the user. At any
+ time, one <code>Document</code> is designated the <dfn>active
+ document</dfn>. The collection of <code>Document</code>s is the
+ <span>browsing context</span>'s <span>session history</span>.</p>
- <p>At any one time, one of the <code>Document</code>s in a
- <span>browsing context</span> is the <dfn>active document</dfn>. The
- collection of <code>Document</code>s is the <span>browsing
- context</span>'s <span>session history</span>.</p>
+ <p>Each <span>browsing context</span> has a corresponding
+ <code>WindowProxy</code> object.</p>
+ <p>Each <code>Document</code> has a collection of one or more <span
+ title="view">views</span>.</p>
+
<p>A <dfn>view</dfn> is a user agent interface tied to a particular
- media used for the presentation of <code>Document</code> objects in
- some media. A view may be interactive. Each view is represented by
- an <code>AbstractView</code> object. Each view belongs to a
- <span>browsing context</span>. <a
+ media used for the presentation of a particular
+ <code>Document</code> object in some media. A view may be
+ interactive. Each view is represented by an
+ <code>AbstractView</code> object. <a
href="#refsDOM2VIEWS">[DOM2VIEWS]</a></p>
+ <p>The main <span>view</span> through which a user primarily
+ interacts with a user agent is the <dfn>default view</dfn>. The
+ <code>AbstractView</code> object that represents this view must also
+ implement the <code>Window</code> interface, and is referred to as
+ the <code>Document</code>'s <code>Window</code> object.</p>
+
+ <p class="note">The <span>default view</span> of a
+ <code>Document</code> is given by the <code
+ title="">defaultView</code> attribute on the <code>Document</code>
+ object's <code>DocumentView</code> interface. <a
+ href="#refsDOM3VIEWS">[DOM3VIEWS]</a></p>
+
<p class="note">The <code title="">document</code> attribute of an
<code>AbstractView</code> object representing a <span>view</span>
- gives the <code>Document</code> object of the view's <span>browsing
- context</span>'s <span>active document</span>. <a
+ gives the view's corresponding <code>Document</code> object. <a
href="#refsDOM2VIEWS">[DOM2VIEWS]</a></p>
<p class="note">Events that use the <code>UIEvent</code> interface
@@ -37655,18 +37662,21 @@
href="#refsDOM3EVENTS">[DOM3EVENTS]</a></p>
<p class="note">A typical Web browser has one obvious
- <span>view</span> per <span>browsing context</span>: the browser's
- window (screen media). If a page is printed, however, a second view
- becomes evident, that of the print media. The two views always share
- the same underlying <code>Document</code>, but they have a different
- presentation of that document. A speech browser also establishes a
- browsing context, one with a view in the speech media.</p>
+ <span>view</span> per <code>Document</code>: the browser's window
+ (screen media). This is typically the <span>default view</span>. If
+ a page is printed, however, a second view becomes evident, that of
+ the print media. The two views always share the same underlying
+ <code>Document</code> object, but they have a different presentation
+ of that object. A speech browser might have a different
+ <span>default view</span>, using the speech media.</p>
<p class="note">A <code>Document</code> does not necessarily have a
<span>browsing context</span> associated with it. In particular,
data mining tools are likely to never instantiate browsing
contexts.</p>
+ <hr>
+
<p>A <span>browsing context</span> can have a <dfn>creator browsing
context</dfn>, the <span>browsing context</span> that was
responsible for its creation. Unless otherwise specified, a
@@ -37680,15 +37690,6 @@
title="">A</var> was created is the <dfn>creator
<code>Document</code></dfn>.</p>
- <p>The main <span>view</span> through which a user primarily
- interacts with a user agent is the <dfn>default view</dfn>.</p>
-
- <p class="note">The <span>default view</span> of a
- <code>Document</code> is given by the <code
- title="">defaultView</code> attribute on the <code>Document</code>
- object's <code>DocumentView</code> interface. <a
- href="#refsDOM3VIEWS">[DOM3VIEWS]</a></p>
-
<p>When a <span>browsing context</span> is first created, it must be
created with a single <code>Document</code> in its session history,
whose <span title="the document's address">address</span> is
@@ -37775,31 +37776,33 @@
<h5>Navigating nested browsing contexts in the DOM</h5>
<p>The <dfn title="dom-top"><code>top</code></dfn> DOM attribute on
- the <code>Window</code> object of a <span>browsing context</span>
- <var title="">b</var> must return the <code>Window</code> object of
- its <span>top-level browsing context</span> (which would be its own
- <code>Window</code> object if it was a <span>top-level browsing
- context</span> itself).</p>
+ the <code>Window</code> object of a <code>Document</code> in a
+ <span>browsing context</span> <var title="">b</var> must return the
+ <code>WindowProxy</code> object of its <span>top-level browsing
+ context</span> (which would be its own <code>WindowProxy</code>
+ object if it was a <span>top-level browsing context</span>
+ itself).</p>
<p>The <dfn title="dom-parent"><code>parent</code></dfn> DOM
- attribute on the <code>Window</code> object of a <span>browsing
- context</span> <var title="">b</var> must return the
- <code>Window</code> object of the <span>parent browsing
- context</span>, if there is one (i.e. if <var title="">b</var> is a
- <span>child browsing context</span>), or the <code>Window</code>
- object of the <span>browsing context</span> <var title="">b</var>
- itself, otherwise (i.e. if it is a <span>top-level browsing
- context</span>).</p>
+ attribute on the <code>Window</code> object of a
+ <code>Document</code> in a <span>browsing context</span> <var
+ title="">b</var> must return the <code>WindowProxy</code> object of
+ the <span>parent browsing context</span>, if there is one (i.e. if
+ <var title="">b</var> is a <span>child browsing context</span>), or
+ the <code>WindowProxy</code> object of the <span>browsing
+ context</span> <var title="">b</var> itself, otherwise (i.e. if it
+ is a <span>top-level browsing context</span>).</p>
<p>The <dfn title="dom-frameElement"><code>frameElement</code></dfn>
- DOM attribute on the <code>Window</code> object of a <span>browsing
- context</span> <var title="">b</var>, on getting, must run the
- following algorithm:</p>
+ DOM attribute on the <code>Window</code> object of a
+ <code>Document</code> <var title="">d</var>, on getting, must run
+ the following algorithm:</p>
<ol>
- <li><p>If <var title="">b</var> is not a <span>child browsing
- context</span>, return null and abort these steps.</p></li>
+ <li><p>If <var title="">d</var> is not a <code>Document</code> in a
+ <span>child browsing context</span>, return null and abort these
+ steps.</p></li>
<li><p>If the <span>parent browsing context</span>'s <span>active
document</span> does not have the <span>same</span> <span>effective
@@ -37837,10 +37840,10 @@
<p>The <dfn title="dom-opener"><code>opener</code></dfn> DOM
attribute on the <code>Window</code> object must return the
- <code>Window</code> object of the <span>browsing context</span> from
- which the current browsing context was created (its <span>opener
- browsing context</span>), if there is one and it is still
- available.</p>
+ <code>WindowProxy</code> object of the <span>browsing context</span>
+ from which the current <span>browsing context</span> was created
+ (its <span>opener browsing context</span>), if there is one and it
+ is still available.</p>
@@ -38062,18 +38065,24 @@
+ <h3>The <code>WindowProxy</code> object</h3>
- <h3>The default view</h3>
+ <p>As mentioned earlier, each <span>browsing context</span> has a
+ <dfn>WindowProxy</dfn> object. This object is unusual in that it
+ must proxy all operations to the <code>Window</code> object of the
+ <span>browsing context</span>'s <span>active document</span>. It is
+ thus indistinguishable from that <code>Window</code> object in every
+ way, except that it is not equal to it.</p>
- <p>The <code>AbstractView</code> object of <span title="default
- view">default views</span> must also implement the
- <code>Window</code> and <code>EventTarget</code> interfaces.</p>
+
+ <h3>The <code>Window</code> object</h3>
+
<pre class="idl">[<span title="dom-window-item">IndexGetter</span>, <span title="dom-window-namedItem">NameGetter</span>=OverrideBuiltins]
interface <dfn>Window</dfn> {
// the current browsing context
- readonly attribute <span>Window</span> <span title="dom-window">window</span>;
- readonly attribute <span>Window</span> <span title="dom-self">self</span>;
+ readonly attribute <span>WindowProxy</span> <span title="dom-window">window</span>;
+ readonly attribute <span>WindowProxy</span> <span title="dom-self">self</span>;
attribute DOMString <span title="dom-name">name</span>;
[PutForwards=href] readonly attribute <span>Location</span> <span title="dom-document-location">location</span>;
readonly attribute <span>History</span> <span title="dom-history">history</span>;
@@ -38091,13 +38100,13 @@
void <span title="dom-window-blur">blur</span>();
// other browsing contexts
- readonly attribute <span>Window</span> <span title="dom-frames">frames</span>;
+ readonly attribute <span>WindowProxy</span> <span title="dom-frames">frames</span>;
readonly attribute unsigned long <span title="dom-length">length</span>;
- readonly attribute <span>Window</span> <span title="dom-top">top</span>;
- [Replaceable] readonly attribute <span>Window</span> <span title="dom-opener">opener</span>;
- readonly attribute <span>Window</span> <span title="dom-parent">parent</span>;
+ readonly attribute <span>WindowProxy</span> <span title="dom-top">top</span>;
+ [Replaceable] readonly attribute <span>WindowProxy</span> <span title="dom-opener">opener</span>;
+ readonly attribute <span>WindowProxy</span> <span title="dom-parent">parent</span>;
readonly attribute <span>Element</span> <span title="dom-frameElement">frameElement</span>;
- <span>Window</span> <span title="dom-open">open</span>([Optional] in DOMString url, [Optional] in DOMString target, [Optional] in DOMString features, [Optional] in DOMString replace);
+ <span>WindowProxy</span> <span title="dom-open">open</span>([Optional] in DOMString url, [Optional] in DOMString target, [Optional] in DOMString features, [Optional] in DOMString replace);
// the user agent
readonly attribute <span>Navigator</span> <span title="dom-navigator">navigator</span>; <!-- XXX IE6 also has window.clientInformation pointing to this same object -->
@@ -38164,31 +38173,25 @@
http://lxr.mozilla.org/mozilla/source/dom/public/idl/base/nsIDOMWindowInternal.idl - DOM level 0
-->
+ <p>The <code>Window</code> object must also implement the
+ <code>EventTarget</code> interface.</p>
+
<p>The <dfn title="dom-window"><code>window</code></dfn>, <dfn
title="dom-frames"><code>frames</code></dfn>, and <dfn
title="dom-self"><code>self</code></dfn> DOM attributes must all
- return the <code>Window</code> object itself.</p>
+ return the <code>Window</code> object's <span>browsing
+ context</span>'s <code>WindowProxy</code> object.</p>
- <p>The <code>Window</code> object also provides the scope for <span title="concept-script">script</span>
- execution. Each <code>Document</code> in a <span>browsing
- context</span> has an associated <dfn>list of added properties</dfn>
- that, when a document is <span title="active
- document">active</span>, are available on the
- <code>Document</code>'s <span>default view</span>'s
- <code>Window</code> object. A <code>Document</code> object's
- <span>list of added properties</span> must be empty when the
- <code>Document</code> object is created.</p>
-
<h4>Security</h4>
- <p>User agents must raise a <code>SECURITY_ERR</code> exception whenever
- any of the members of a <code>Window</code> object are accessed by
- scripts whose <span>effective script origin</span> is not the same
- as the <code>Window</code> object's <span>browsing context</span>'s
- <span>active document</span>'s <span>effective script origin</span>,
- with the following exceptions:</p>
+ <p>User agents must raise a <code>SECURITY_ERR</code> exception
+ whenever any of the members of a <code>Window</code> object are
+ accessed by scripts whose <span>effective script origin</span> is
+ not the same as the <code>Window</code> object's
+ <code>Document</code>'s <span>effective script origin</span>, with
+ the following exceptions:</p>
<ul>
@@ -38282,10 +38285,12 @@
<span title="concept-script">script</span> that invoked the method
as the <span>source browsing context</span>.</p>
- <p>The method must return the <code>Window</code> object of the
- default view of the <span>browsing context</span> that was
- navigated, or null if no browsing context was navigated.</p>
+ <p>The method must return the <code>WindowProxy</code> object of the
+ <span>browsing context</span> that was navigated, or null if no
+ browsing context was navigated.</p>
+ <hr>
+
<p>The <dfn title="dom-name"><code>name</code></dfn> attribute of
the <code>Window</code> object must, on getting, return the current
name of the <span>browsing context</span>, and, on setting, set the
@@ -38294,6 +38299,8 @@
<p class="note">The name <a href="#resetBCName">gets reset</a> when
the browsing context is navigated to another domain.</p>
+ <hr>
+
<p>The <dfn title="dom-window-close"><code>close()</code></dfn>
method on <code>Window</code> objects should, if the corresponding
<span>browsing context</span> <var title="">A</var> is an
@@ -38313,25 +38320,23 @@
<p>The <dfn title="dom-length"><code>length</code></dfn> DOM
attribute on the <code>Window</code> interface must return the
number of <span title="child browsing context">child browsing
- contexts</span> of the <span title="active document">active</span>
- <code>Document</code>.</p>
+ contexts</span> of the <code>Document</code>.</p>
<p>The <span>indices of the supported indexed properties</span> on
the <code>Window</code> object at any instant are the numbers in the
range 0 .. <span><var title="">n</var>-1</span>, where <var
title="">n</var> is the number of <span title="child browsing
- context">child browsing contexts</span> of the <span title="active
- document">active</span> <code>Document</code>. If <var
- title="">n</var> is zero then there are no <span>supported indexed
- properties</span>.</p>
+ context">child browsing contexts</span> of the
+ <code>Document</code>. If <var title="">n</var> is zero then there
+ are no <span>supported indexed properties</span>.</p>
<p>When a <code>Window</code> object is <dfn
title="dom-window-item">indexed to retrieve an indexed
property</dfn> <var title="">index</var>, the value returned must be
the <var title="">index</var>th <span>child browsing context</span>
- of the <span title="active document">active</span>
- <code>Document</code>, sorted in document order of the elements
- nesting those browsing contexts.</p>
+ of the <code>Document</code>, sorted in the <span>tree order</span>
+ of the elements nesting those <span title="browsing
+ context">browsing contexts</span>.</p>
<p>These properties are the <dfn>dynamic nested browsing context
properties</dfn>.</p>
@@ -38340,11 +38345,15 @@
<h4>Garbage collection and browsing contexts</h4>
<p>A <span>browsing context</span> has a strong reference to each of
- its <code>Document</code>s and <span title="view">views</span>, and
- the user agent itself has a strong reference to its <span
+ its <code>Document</code>s and its <code>WindowProxt</code> object,
+ and the user agent itself has a strong reference to its <span
title="top-level browsing context">top-level browsing
contexts</span>.</p>
+ <p>A <code>Document</code> has a strong reference to each of its
+ <span title="view">views</span> and their <code>AbstractView</code>
+ objects.</p>
+
<p>When a <span>browsing context</span> is to <dfn>discard a
<code>Document</code></dfn>, that means that it is to lose the
strong reference from the <code>Document</code>'s <span>browsing
@@ -38352,9 +38361,8 @@
<p class="note">The <span>browsing context</span>'s <span>default
view</span>'s <code>Window</code> object <span title="implied strong
- reference">has a strong reference of its own</span> to the
- <code>Document</code> object of the <span>browsing context</span>'s
- <span>active document</span>.</p>
+ reference">has a strong reference of its own</span> to its
+ <code>Document</code> object.</p>
<p>When <dfn>a <em><span>browsing context</span></em> is
discarded</dfn>, the strong reference from the user agent itself to
@@ -38370,7 +38378,7 @@
containing one or more <span title="top-level browsing
context">top-level browsing contexts</span>). Other <span
title="browsing context">browsing contexts</span> must be discarded
- once their <code>Window</code> object is eligible for garbage
+ once their <code>WindowProxy</code> object is eligible for garbage
collection.</p>
@@ -38419,10 +38427,10 @@
<li>
<p>If <var title="">elements</var> contains an <code>iframe</code>
- element, then return the <code>Window</code> object of the
- <span>default view</span> of the <span>nested browsing
- context</span> represented by the first such <code>iframe</code>
- element in <span>tree order</span>, and abort these steps.</p>
+ element, then return the <code>WindowProxy</code> object of the
+ <span>nested browsing context</span> represented by the first such
+ <code>iframe</code> element in <span>tree order</span>, and abort
+ these steps.</p>
</li>
@@ -38777,8 +38785,7 @@
<dd>The <span>origin</span> and <span>effective script
origin</span> are equal to the <span>origin</span> and
<span>effective script origin</span> of the <code>Document</code>
- object that was the <span>active document</span> of the browsing context of the
- <code>Window</code> object from which the
+ object of the <code>Window</code> object from which the
<code>XMLHttpRequest</code> constructor was invoked. (That is,
they track the <code>Document</code> to which the
<code>XMLHttpRequest</code> object's <a
@@ -39260,24 +39267,6 @@
</dd>
- <dt>Membership in a <dfn>script group</dfn></dt>
-
- <dd>
-
- <p>A group of one or more scripts that are loaded in the same
- context, which are always disabled as a group. Scripts in a script
- group all have the same <span title="script's global
- object">global object</span> and <span title="script's browsing
- context">browsing context</span>.</p>
-
- <p>A script group can be <i>frozen</i>. When a script group is
- frozen, any code defined in that script group will throw an
- exception when invoked. A frozen script group can be
- <i>unfrozen</i>, allowing scripts in that script group to run
- normally again.</p>
-
- </dd>
-
</dl>
@@ -39285,61 +39274,41 @@
<h5>Calling scripts</h5>
<p>When a user agent is to <dfn>jump to a code entry-point</dfn> for
- a <span title="concept-script">script</span>, for example because
- one <span title="concept-script">script</span> has called another,
- or because the user agent is to invoke a callback defined in that
- <span title="concept-script">script</span>, the user agent must run
- the following steps:</p>
+ a <span title="concept-script">script</span>, for example to invoke
+ an event listener defined in that <span
+ title="concept-script">script</span>, the user agent must run the
+ following steps:</p>
<ol>
- <li>
+ <li><p>If the <span>script's global object</span> is a
+ <code>Window</code> object whose <code>Document</code> object is
+ not <span>fully active</span>, then abort these steps without doing
+ anything. The callback is not fired.</p>
- <p>If executable code from a <span
- title="concept-script">script</span> is making a call to a <span
- title="concept-script">script</span> in the same <span>script
- group</span>, then skip this step.</p>
+ <li><p>Set the <span>first script</span> to be the <span
+ title="concept-script">script</span> being invoked.</p></li>
- <p>Otherwise, if <span title="concept-bc-noscript">scripting is
- disabled</span> in the <span>script's browsing context</span>, or
- if the script's <span>script group</span> is <i>frozen</i>, then
- the user agent must throw an <code>UNAVAILABLE_SCRIPT_ERR</code>
- exception and abort these steps.</p>
-
- </li>
-
- <li><p>If this algorithm was <em>not</em> invoked by one script
- calling another, then set the <span>first script</span> to be the
- <span title="concept-script">script</span> being invoked.</p></li>
-
<li><p>Make the <span title="script execution environment">script
execution environment</span> for the <span
title="concept-script">script</span> execute the code for the given
code entry-point.</p></li>
- <li><p>If this algorithm was <em>not</em> invoked by one script
- calling another, then set the <span>first script</span> back to
- whatever it was when this algorithm started.</p></li>
+ <li><p>Set the <span>first script</span> back to whatever it was
+ when this algorithm started.</p></li>
</ol>
- <p class="note">In particular, this means that scripts in a
- <i>frozen</i> <span>script group</span> can keep on executing so
- long as they don't call code in another <span>script
- group</span>. This is why a script doesn't immediately terminate
- after calling <code title="dom-document-open">document.open()</code>
- on its own <code>Document</code>.</p>
+ <p>This algorithm is not invoked by one script calling another.</p>
-
<h5 id="creating-scripts">Creating scripts</h5>
<p>When the specification says that a <span
title="concept-script">script</span> is to be <dfn title="create a
script">created</dfn>, given some script source, its scripting
language, a global object, a browsing context, a character encoding,
- a base URL, and a script group, the user agent must run the
- following steps:</p>
+ and a base URL, the user agent must run the following steps:</p>
<ol>
@@ -39359,9 +39328,6 @@
character encoding</span>, and the <span>script's base URL</span>
from the settings passed to this algorithm.</p></li>
- <li><p>Add the <span title="concept-script">script</span> to the given <span>script
- group</span>.</p></li>
-
<li><p><span title="jump to a code entry-point">Jump</span> to the
<span title="concept-script">script</span>'s <i>initial code
entry-point</i>.</p></li>
@@ -39374,11 +39340,10 @@
given some script source, its scripting language, and a browsing
context, the user agent must <span>create a script</span>, using the
given script source and scripting language, using a new empty object
- as the global object, using the given browsing context as the
- browsing context, and using a new script group as the script
- group. The character encoding and base URL for the resulting <span
- title="concept-script">script</span> are not important as no APIs
- are exposed to the script.</p>
+ as the global object, and using the given browsing context as the
+ browsing context. The character encoding and base URL for the
+ resulting <span title="concept-script">script</span> are not
+ important as no APIs are exposed to the script.</p>
<hr>
@@ -39404,8 +39369,7 @@
<li><p>The browsing context is the <span>browsing context</span> of
<var title="">document</var>.</p>
- <li><p>The global object is the <code>Window</code> object of the
- <span>default view</span> of the <span>browsing context</span> of
+ <li><p>The global object is the <code>Window</code> object of
<var title="">document</var>.</p></li>
<li><p>The character encoding is the <span title="document's
@@ -39417,9 +39381,6 @@
URL</span> of <var title="">document</var>. (<a
href="#sbu-not-copy">This is a reference, not a copy</a>.)</p></li>
- <li><p>The script group is the <span>current script group</span> of
- <var title="">document</var>.</p></li>
-
</ol>
@@ -39864,8 +39825,7 @@
of the handler, to the element's object, to the element's
<span>form owner</span>, if it has one, to the element's
<code>Document</code> object, to the <code>Window</code> object of
- the <span>browsing context</span> of that
- <code>Document</code>. Set the function's <code>this</code>
+ that <code>Document</code>. Set the function's <code>this</code>
parameter to the <code>Element</code> object representing the
element. Let this function be the only entry in the script's
<span>list of code entry-points</span>.</p>
@@ -39884,9 +39844,7 @@
<span>script's browsing context</span>, the <span>script's
character encoding</span>, and the <span>script's base URL</span>
from <span>the script settings determined from the node</span> on
- which the attribute is being set, and add the <span
- title="concept-script">script</span> to the <span>script
- group</span> determined from that node as well.</p></li>
+ which the attribute is being set.</p></li>
<li><p>Set the corresponding event handler attribute to the
aforementioned function.</p></li>
@@ -40552,10 +40510,9 @@
<p>The user agent must <span>fire a simple event</span> called
<code title="event-beforeprint">beforeprint</code> at the
- <code>Window</code> object of the browsing context of the
- <code>Document</code> that is being printed, as well as any <span
- title="nested browsing context">nested browsing contexts</span> in
- it.</p>
+ <code>Window</code> object of the <code>Document</code> that is
+ being printed, as well as any <span title="nested browsing
+ context">nested browsing contexts</span> in it.</p>
<p class="example">The <code
title="event-beforeprint">beforeprint</code> event can be used
@@ -40582,10 +40539,9 @@
<p>The user agent must <span>fire a simple event</span> called
<code title="event-afterprint">afterprint</code> at the
- <code>Window</code> object of the browsing context of the
- <code>Document</code> that is being printed, as well as any <span
- title="nested browsing context">nested browsing contexts</span> in
- it.</p>
+ <code>Window</code> object of the <code>Document</code> that is
+ being printed, as well as any <span title="nested browsing
+ context">nested browsing contexts</span> in it.</p>
<p class="example">The <code
title="event-afterprint">afterprint</code> event can be used
@@ -40684,8 +40640,9 @@
title="dom-showModalDialog">showModalDialog()</code> method was
called. The new auxiliary browsing context has no name.</p>
- <p class="note">This browsing context implements the
- <code>WindowModal</code> interface.</p>
+ <p class="note">This <span>browsing context</span>'s
+ <code>Document</code>s' <code>Window</code> objects all implement
+ the <code>WindowModal</code> interface.</p>
</li>
@@ -40742,8 +40699,10 @@
</ol>
- <p>Browsing contexts created by the above algorithm must implement
- the <code>WindowModal</code> interface:</p>
+ <p>The <code>Window</code> objects of <code>Document</code>s hosted
+ by <span title="browsing context">browsing contexts</span> created
+ by the above algorithm must all implement the
+ <code>WindowModal</code> interface:</p>
<p class="XXX">Really I want the Window object to just gain these
attributes, as if they were on the Window prototype. That's the XXX
@@ -43005,13 +42964,12 @@
<p>Objects implementing the <code>ApplicationCache</code> interface
must also implement the <code>EventTarget</code> interface.</p>
- <p>There is a one-to-one mapping from <code>Document</code> objects
- to <code>ApplicationCache</code> objects. The <dfn
+ <p>There is a one-to-one mapping from <code>Window</code> objects to
+ <code>ApplicationCache</code> objects. The <dfn
title="dom-applicationCache"><code>applicationCache</code></dfn>
attribute on <code>Window</code> objects must return the
<code>ApplicationCache</code> object associated with the
- <span>active document</span> of the <code>Window</code>'s
- <span>browsing context</span>.</p>
+ <code>Window</code> object.</p>
<p>An <code>ApplicationCache</code> object might be associated with
an <span>application cache</span>. When the <code>Document</code>
@@ -43249,18 +43207,19 @@
<p><code>History</code> objects provide a representation of the
pages in the session history of <span title="browsing
- context">browsing contexts</span>. Each browsing context has a
- distinct session history.</p>
+ context">browsing contexts</span>. Each <span>browsing
+ context</span>, including <span>nested browsing context</span>, has
+ a distinct session history.</p>
- <p>Each <code>Document</code> object in a browsing context's session
- history is associated with a unique instance of the
- <code>History</code> object, although they all must model the same
- underlying session history.</p>
+ <p>Each <code>Document</code> object in a <span>browsing
+ context</span>'s <span>session history</span> is associated with a
+ unique instance of the <code>History</code> object, although they
+ all must model the same underlying <span>session history</span>.</p>
<p>The <dfn title="dom-history"><code>history</code></dfn> attribute
of the <code>Window</code> interface must return the object
implementing the <code>History</code> interface for that
- <code>Window</code> object's <span>active document</span>.</p>
+ <code>Window</code> object's <code>Document</code>.</p>
<p><code>History</code> objects represent their <span>browsing
context</span>'s session history as a flat list of <span
@@ -43513,13 +43472,14 @@
<dd><p><span>Queue a task</span> to fire a <dfn
title="event-popstate"><code>popstate</code></dfn> event in no
- namespace on the <code>Window</code> object of the <span>browsing
- context</span>, using the <code>PopStateEvent</code> interface,
- with the <code title="dom-PopStateEvent-state">state</code>
- attribute set to the value of <var title="">state</var>. This
- event must bubble but not be cancelable and has no default
- action. The <span>task source</span> for this task is the
- <span>DOM manipulation task source</span>.</p></dd>
+ namespace on the <code>Window</code> object of the
+ <code>Document</code>, using the <code>PopStateEvent</code>
+ interface, with the <code
+ title="dom-PopStateEvent-state">state</code> attribute set to the
+ value of <var title="">state</var>. This event must bubble but
+ not be cancelable and has no default action. The <span>task
+ source</span> for this task is the <span>DOM manipulation task
+ source</span>.</p></dd>
<dt>Otherwise</dt>
@@ -43577,7 +43537,7 @@
<p>The <dfn title="dom-location"><code>location</code></dfn>
attribute of the <code>Window</code> interface must return the
<code>Location</code> object for that <code>Window</code> object's
- <span>active document</span>.</p>
+ <code>Document</code>.</p>
<p><code>Location</code> objects provide a representation of <span
title="the document's address">their document's address</span>, and
@@ -44506,18 +44466,6 @@
<ol>
- <li><p>Freeze the <span>active document</span>'s <span>current
- script group</span>, as well as the <span>current script
- group</span> of any <span title="active document">active
- documents</span> in <span title="nested browsing context">nested
- browsing contexts</span>.</p></li>
-
- <li>The user agent must move any properties that have been added
- to the browsing context's default view's <code>Window</code>
- object to the <span>active document</span>'s
- <code>Document</code>'s <span>list of added
- properties</span>.</li>
-
<li>If the browsing context is a <span>top-level browsing
context</span> (and not an <span>auxiliary browsing
context</span>), and the <span>origin</span> of the
@@ -44565,17 +44513,6 @@
</li>
- <li>The user agent must move any properties that have been added
- to the <span>active document</span>'s <code>Document</code>'s
- <span>list of added properties</span> to browsing context's
- default view's <code>Window</code> object.</li>
-
- <li><p>Unfreeze the <span>active document</span>'s <span>current
- script group</span>, as well as the <span>current script
- group</span> of any <span title="active document">active
- documents</span> in <span title="nested browsing context">nested
- browsing contexts</span>.</p></li>
-
</ol>
</li>
@@ -44629,8 +44566,7 @@
which does not bubble but is cancelable.</p></li>
<li><p>Dispatch <var title="">event</var> at the
- <code>Window</code> object of the <code>Document</code>'s
- <span>browsing context</span>.</p></li>
+ <code>Document</code>'s <code>Window</code> object.</p></li>
<li><p>If any event listeners were triggered by the previous step,
then set <var title="">salvageable</var> to false.</p></li>
@@ -44659,17 +44595,17 @@
</li>
<li><p><span>Fire a simple event</span> called <code
- title="event-unload">unload</code> at the <code>Window</code>
- object of the <code>Document</code>'s <span>browsing
- context</span>.</p></li>
+ title="event-unload">unload</code> at the <code>Document</code>'s
+ <code>Window</code> object.</p></li>
<li><p>If any event listeners were triggered by the previous step,
then set <var title="">salvageable</var> to false.</p></li>
<li><p>If there are any outstanding transactions that have
callbacks that involve <span title="concept-script">scripts</span>
- that are in the document's <span>current script group</span>, roll
- them back (without invoking any of the callbacks) and set <var
+ whose <span title="script's global object">global object</span> is
+ the <code>Document</code>'s <code>Window</code> object, roll them
+ back (without invoking any of the callbacks) and set <var
title="">salvageable</var> to false.</p>
<li><p>If <var title="">salvageable</var> and <var
@@ -45021,10 +44957,9 @@
<p>When the <code title="dom-localStorage">localStorage</code>
attribute is accessed, the user agent must check to see if it has
allocated a local storage area for the <span>origin</span> of the
- <span>active document</span> of the <span>browsing context</span> of
- the <code>Window</code> object on which the method was invoked. If
- it has not, a new storage area for that <span>origin</span> must be
- created.</p>
+ <code>Document</code> of the <code>Window</code> object on which the
+ method was invoked. If it has not, a new storage area for that
+ <span>origin</span> must be created.</p>
<p>The user agent must then return the <code>Storage</code> object
associated with that origin's local storage area. Each
@@ -45060,9 +44995,9 @@
<p>When this happens, the user agent must dispatch an event with the
name <code>storage</code>, with no namespace, which does not bubble
but is cancelable, and which uses the <code>StorageEvent</code>
- interface, at each <code>Window</code> object whose <span>active
- document</span> has a <code>Storage</code> object that is
- affected.</p>
+ interface, at each <code>Window</code> object whose
+ <code>Document</code> object both has a <code>Storage</code> object
+ that is affected, and is <span>fully active</span>.</p>
<p>If the event is being fired due to an invocation of the
<code title="dom-Storage-setItem">setItem()</code> or <code
@@ -45087,14 +45022,15 @@
title="the document's address">the address of the document</span>
whose <code>Storage</code> object was affected; its <code
title="dom-StorageEvent-source">source</code> attribute set to the
- <code>Window</code> object of the <span>browsing context</span> that
- that document is in, if the two documents are in the same <span>unit
- of related browsing contexts</span>, or null otherwise; and its
- <code title="dom-StorageEvent-storageArea">storageArea</code>
- attribute set to the <code>Storage</code> object from the
- <code>Window</code> object of the target <code>Document</code> that
- represents the same kind of <code>Storage</code> area as was
- affected (i.e. session or local).</p>
+ that document's <span>browsing context</span>'s
+ <code>WindowProxy</code> object, if the two documents are in the
+ same <span>unit of related browsing contexts</span>, or null
+ otherwise; and its <code
+ title="dom-StorageEvent-storageArea">storageArea</code> attribute
+ set to the <code>Storage</code> object from the <code>Window</code>
+ object of the target <code>Document</code> that represents the same
+ kind of <code>Storage</code> area as was affected (i.e. session or
+ local).</p>
<h6>Event definition</h6>
@@ -45104,10 +45040,10 @@
readonly attribute DOMString <span title="dom-StorageEvent-oldValue">oldValue</span>;
readonly attribute DOMString <span title="dom-StorageEvent-newValue">newValue</span>;
readonly attribute DOMString <span title="dom-StorageEvent-url">url</span>;
- readonly attribute <span>Window</span> <span title="dom-StorageEvent-source">source</span>;
+ readonly attribute <span>WindowProxy</span> <span title="dom-StorageEvent-source">source</span>;
readonly attribute <span>Storage</span> <span title="dom-StorageEvent-storageArea">storageArea</span>;
- void <span title="dom-StorageEvent-initStorageEvent">initStorageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <span>Window</span> sourceArg, in <span>Storage</span> storageAreaArg);
- void <span title="dom-StorageEvent-initStorageEventNS">initStorageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <span>Window</span> sourceArg, in <span>Storage</span> storageAreaArg);
+ void <span title="dom-StorageEvent-initStorageEvent">initStorageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <span>WindowProxy</span> sourceArg, in <span>Storage</span> storageAreaArg);
+ void <span title="dom-StorageEvent-initStorageEventNS">initStorageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <span>WindowProxy</span> sourceArg, in <span>Storage</span> storageAreaArg);
};</pre>
<p>The <dfn
@@ -45135,8 +45071,8 @@
<p>The <dfn
title="dom-StorageEvent-source"><code>source</code></dfn> attribute
- represents the <code>Window</code> object of the document whose key
- changed.</p>
+ represents the <code>WindowProxy</code> object of the <span>browsing
+ context</span> of the document whose key changed.</p>
<p>The <dfn
title="dom-StorageEvent-storageArea"><code>storageArea</code></dfn>
@@ -45219,8 +45155,8 @@
<p>The <code title="dom-opendatabase">openDatabase()</code> method
must use and create databases from the <span>origin</span> of the
- <span>active document</span> of the <span>browsing context</span> of
- the <code>Window</code> object on which the method was invoked.</p>
+ <code>Document</code> of the <code>Window</code> object on which the
+ method was invoked.</p>
<p>If the database version provided is not the empty string, and the
database already exists but has a different version, or no version,
@@ -50343,10 +50279,10 @@
readonly attribute any <span title="dom-MessageEvent-data">data</span>;
readonly attribute DOMString <span title="dom-MessageEvent-origin">origin</span>;
readonly attribute DOMString <span title="dom-MessageEvent-lastEventId">lastEventId</span>;
- readonly attribute <span>Window</span> <span title="dom-MessageEvent-source">source</span>;
+ readonly attribute <span>WindowProxy</span> <span title="dom-MessageEvent-source">source</span>;
readonly attribute <span>MessagePort</span> <span title="dom-MessageEvent-messagePort">messagePort</span>;
- void <span title="dom-MessageEvent-initMessageEvent">initMessageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg, in <span>MessagePort</span> messagePortArg);
- void <span title="dom-MessageEvent-initMessageEventNS">initMessageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg, in <span>MessagePort</span> messagePortArg);
+ void <span title="dom-MessageEvent-initMessageEvent">initMessageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in <span>WindowProxy</span> sourceArg, in <span>MessagePort</span> messagePortArg);
+ void <span title="dom-MessageEvent-initMessageEventNS">initMessageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in <span>WindowProxy</span> sourceArg, in <span>MessagePort</span> messagePortArg);
};</pre>
<p>The <dfn
@@ -50377,7 +50313,8 @@
<p>The <dfn
title="dom-MessageEvent-source"><code>source</code></dfn> attribute
represents, in <span>cross-document messaging</span>, the
- <code>Window</code> from which the message came.</p>
+ <code>WindowProxy</code> of the <span>browsing context</span> of the
+ <code>Window</code> object from which the message came.</p>
<p>The <dfn
title="dom-MessageEvent-messagePort"><code>messagePort</code></dfn>
@@ -52157,11 +52094,10 @@
<p>If the <var title="">targetOrigin</var> argument has a value
other than a single literal U+002A ASTERISK character ("*"), and
- the <span>active document</span> of the <span>browsing
- context</span> of the <code>Window</code> object on which the
- method was invoked does not have the <span>same origin</span> as
- <var title="">targetOrigin</var>, then abort these steps
- silently.</p>
+ the <code>Document</code> of the <code>Window</code> object on
+ which the method was invoked does not have the <span>same
+ origin</span> as <var title="">targetOrigin</var>, then abort
+ these steps silently.</p>
</li>
@@ -52178,12 +52114,9 @@
origin">Unicode serialization</span> of the <span>origin</span> of
the script that invoked the method, and the <code
title="dom-MessageEvent-source">source</code> attribute must be
- set to the <code>Window</code> object of the <span>default
- view</span> of the <span>browsing context</span> for which the
- <code>Document</code> object with which the script is associated
- is the <span>active document</span><!--, if there is one, or null
- otherwise-->.</p><!-- I think there always is one, because scripts
- can't run and see a Window without that being the case. -->
+ set to the <span>script's global object</span>.</p> <!-- invariant:
+ the global scope is always a Window if the script can see this
+ method -->
</li>
@@ -52194,7 +52127,6 @@
method was invoked. The <span>task source</span> for this <span
title="concept-task">task</span> is the <span>posted message task
source</span>.</p>
- <!-- XXX apply any body/window dispatch decisions here -->
</li>
@@ -52271,11 +52203,10 @@
<p>If the <var title="">targetOrigin</var> argument has a value
other than a single literal U+002A ASTERISK character ("*"), and
- the <span>active document</span> of the <span>browsing
- context</span> of the <code>Window</code> object on which the
- method was invoked does not have the <span>same origin</span> as
- <var title="">targetOrigin</var>, then abort these steps
- silently.</p>
+ the <code>Document</code> of the <code>Window</code> object on
+ which the method was invoked does not have the <span>same
+ origin</span> as <var title="">targetOrigin</var>, then abort
+ these steps silently.</p>
</li>
@@ -52292,12 +52223,9 @@
origin">Unicode serialization</span> of the <span>origin</span> of
the script that invoked the method, and the <code
title="dom-MessageEvent-source">source</code> attribute must be
- set to the <code>Window</code> object of the <span>default
- view</span> of the <span>browsing context</span> for which the
- <code>Document</code> object with which the script is associated
- is the <span>active document</span><!--, if there is one, or null
- otherwise-->.</p><!-- I think there always is one, because scripts
- can't run and see a Window without that being the case. -->
+ set to the <span>script's global object</span>.</p> <!-- invariant:
+ the global scope is always a Window if the script can see this
+ method -->
</li>
@@ -52316,7 +52244,6 @@
method was invoked. The <span>task source</span> for this <span
title="concept-task">task</span> is the <span>posted message task
source</span>.</p>
- <!-- XXX apply any body/window dispatch decisions here -->
</li>
@@ -52633,8 +52560,10 @@
<span>event loop</span> must use it as one of its <span title="task
source">task sources</span>.</p>
- <p class="note">If the <span>script group</span> of the port's event
- handlers is <i>frozen</i>, then the messages are lost.</p>
+ <p class="note">If the <code>Document</code> of the port's event
+ handlers' <span title="script's global object">global object</span>
+ is not <span>fully active</span>, then the messages are lost.</p>
+ <!-- because of the jump-to-entry-point algorithm first step -->
<hr>
@@ -60100,14 +60029,14 @@
<li>If the <code>Document</code> is in a <span>browsing
context</span>, then <span>queue a task</span> to <span title="fire
a load event">fire a <code title="event-load">load</code>
- event</span> at the <span>browsing context</span>'s
- <code>Window</code> object.</li>
+ event</span> at the <code>Document</code>'s <code>Window</code>
+ object.</li>
<li>If the <code>Document</code> has a <span>pending state
object</span>, then <span>queue a task</span> to fire a <code
title="event-popstate">popstate</code> event in no namespace on the
- <span>browsing context</span>'s <code>Window</code> object using
- the <code>PopStateEvent</code> interface, with the <code
+ <code>Document</code>'s <code>Window</code> object using the
+ <code>PopStateEvent</code> interface, with the <code
title="dom-PopStateEvent-state">state</code> attribute set to the
current value of the <span>pending state object</span>. This event
must bubble but not be cancelable and has no default action.</li>
@@ -61502,8 +61431,9 @@
title="dom-windowtimers-setTimeout">setTimeout()</code> and <code
title="dom-windowtimers-setInterval">setInterval()</code>, the clock
upon which the timers are based must only tick while the
- <span>script group</span> of their callbacks is not
- <i>frozen</i>.</p>
+ <code>Document</code> of the <span title="script's global
+ object">global object</span> of their callbacks is <span>fully
+ active</span>.</p>