[html5] r2686 - [giow] (2) Make sure to fire the relevant events on the Window object now instea [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Jan 21 03:34:11 PST 2009


Author: ianh
Date: 2009-01-21 03:34:10 -0800 (Wed, 21 Jan 2009)
New Revision: 2686

Modified:
   index
   source
Log:
[giow] (2) Make sure to fire the relevant events on the Window object now instead of the body element. Define onpopstate. Other minor fixes for the previous checkin.

Modified: index
===================================================================
--- index	2009-01-21 11:08:03 UTC (rev 2685)
+++ index	2009-01-21 11:34:10 UTC (rev 2686)
@@ -7955,7 +7955,8 @@
     characters just inserted into the input stream. (The
     <code>Document</code> node will have been populated with elements
     and a <code title=event-load><a href=#event-load>load</a></code> event will have fired
-    on <a href=#the-body-element-1 title="the body element">its body element</a>.)</p>
+    on its <a href=#browsing-context>browsing context</a>'s <code><a href=#window>Window</a></code>
+    object.)</p>
 
    </li>
 
@@ -10472,8 +10473,9 @@
    <dd><code title=handler-window-onhashchange><a href=#handler-window-onhashchange>onhashchange</a></code></dd>
    <dd><code title=handler-window-onload><a href=#handler-window-onload>onload</a></code></dd>
    <dd><code title=handler-window-onmessage><a href=#handler-window-onmessage>onmessage</a></code></dd>
+   <dd><code title=handler-window-onoffline><a href=#handler-window-onoffline>onoffline</a></code></dd>
    <dd><code title=handler-window-ononline><a href=#handler-window-ononline>ononline</a></code></dd>
-   <dd><code title=handler-window-onoffline><a href=#handler-window-onoffline>onoffline</a></code></dd>
+   <dd><code title=handler-window-onpopstate><a href=#handler-window-onpopstate>onpopstate</a></code></dd>
    <dd><code title=handler-window-onresize><a href=#handler-window-onresize>onresize</a></code></dd>
    <dd><code title=handler-window-onstorage><a href=#handler-window-onstorage>onstorage</a></code></dd>
    <dd><code title=handler-window-onunload><a href=#handler-window-onunload>onunload</a></code></dd>
@@ -10481,12 +10483,13 @@
    <dd>
 <pre class=idl>interface <dfn id=htmlbodyelement>HTMLBodyElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
            attribute <a href=#function>Function</a> <a href=#handler-window-onbeforeunload title=handler-window-onbeforeunload>onbeforeunload</a>;
-           attribute <a href=#function>Function</a> <a href=#handler-window-onerror title=handler-window-onerror>onerror</a>;
+           attribute any     <!--      --> <a href=#handler-window-onerror title=handler-window-onerror>onerror</a>;
            attribute <a href=#function>Function</a> <a href=#handler-window-onhashchange title=handler-window-onhashchange>onhashchange</a>;
            attribute <a href=#function>Function</a> <a href=#handler-window-onload title=handler-window-onload>onload</a>;
            attribute <a href=#function>Function</a> <a href=#handler-window-onmessage title=handler-window-onmessage>onmessage</a>;
+           attribute <a href=#function>Function</a> <a href=#handler-window-onoffline title=handler-window-onoffline>onoffline</a>;
            attribute <a href=#function>Function</a> <a href=#handler-window-ononline title=handler-window-ononline>ononline</a>;
-           attribute <a href=#function>Function</a> <a href=#handler-window-onoffline title=handler-window-onoffline>onoffline</a>;
+           attribute <a href=#function>Function</a> <a href=#handler-window-onpopstate title=handler-window-onpopstate>onpopstate</a>;
            attribute <a href=#function>Function</a> <a href=#handler-window-onresize title=handler-window-onresize>onresize</a>;
            attribute <a href=#function>Function</a> <a href=#handler-window-onstorage title=handler-window-onstorage>onstorage</a>;
            attribute <a href=#function>Function</a> <a href=#handler-window-onunload title=handler-window-onunload>onunload</a>;
@@ -33689,6 +33692,9 @@
            attribute <a href=#function>Function</a> <a href=#handler-onmouseover title=handler-onmouseover>onmouseover</a>;
            attribute <a href=#function>Function</a> <a href=#handler-onmouseup title=handler-onmouseup>onmouseup</a>;
            attribute <a href=#function>Function</a> <a href=#handler-onmousewheel title=handler-onmousewheel>onmousewheel</a>;
+           attribute <a href=#function>Function</a> <a href=#handler-window-ononline title=handler-window-ononline>ononline</a>;
+           attribute <a href=#function>Function</a> <a href=#handler-window-onoffline title=handler-window-onoffline>onoffline</a>;
+           attribute <a href=#function>Function</a> <a href=#handler-window-onpopstate title=handler-window-onpopstate>onpopstate</a>;
            attribute <a href=#function>Function</a> <a href=#handler-window-onresize title=handler-window-onresize>onresize</a>;
            attribute <a href=#function>Function</a> <a href=#handler-onscroll title=handler-onscroll>onscroll</a>;
            attribute <a href=#function>Function</a> <a href=#handler-onselect title=handler-onselect>onselect</a>;
@@ -35463,6 +35469,11 @@
    <dd><p>Must be invoked whenever a <code title=event-online><a href=#event-online>online</a></code> event is targeted at or bubbles
    through the object.</dd>
 
+   <dt><dfn id=handler-window-onpopstate title=handler-window-onpopstate><code>onpopstate</code></dfn></dt> <!-- new -->
+
+   <dd><p>Must be invoked whenever a <code title=event-popstate><a href=#event-popstate>popstate</a></code> event is targeted at or bubbles
+   through the object.</dd>
+
    <dt><dfn id=handler-window-onresize title=handler-window-onresize><code>onresize</code></dfn></dt> <!-- widely used -->
 
    <dd><p>Must be invoked whenever a <code title=event-resize>resize</code> event is targeted at or bubbles
@@ -37985,14 +37996,14 @@
 
   <p>When the value that would be returned by the <code title=dom-navigator-onLine><a href=#dom-navigator-online>navigator.onLine</a></code> attribute of
   the <code><a href=#window>Window</a></code> changes from true to false, the user agent
-  must <a href=#fire-a-simple-event>fire a simple event</a> called <dfn id=event-offline title=event-offline><code>offline</code></dfn> at <a href=#the-body-element-1>the body
-  element</a>.</p>
+  must <a href=#fire-a-simple-event>fire a simple event</a> called <dfn id=event-offline title=event-offline><code>offline</code></dfn> at the
+  <code><a href=#window>Window</a></code> object.</p>
 
   <p>On the other hand, when the value that would be returned by the
   <code title=dom-navigator-onLine><a href=#dom-navigator-online>navigator.onLine</a></code> attribute
   of the <code><a href=#window>Window</a></code> changes from false to true, the user
-  agent must <a href=#fire-a-simple-event>fire a simple event</a> called <dfn id=event-online title=event-online><code>online</code></dfn> at <a href=#the-body-element-1>the body
-  element</a>.</p>
+  agent must <a href=#fire-a-simple-event>fire a simple event</a> called <dfn id=event-online title=event-online><code>online</code></dfn> at the
+  <code><a href=#window>Window</a></code> object.</p>
 
   <p class=note>This attribute is inherently unreliable. A computer
   can be connected to a network without having Internet access.</p>
@@ -38230,12 +38241,13 @@
      string "complete"</dt>
 
      <dd><p><a href=#queue-a-task>Queue a task</a> to fire a <dfn id=event-popstate title=event-popstate><code>popstate</code></dfn> event in no
-     namespace on <a href=#the-body-element-1>the body element</a> using the
-     <code><a href=#popstateevent>PopStateEvent</a></code> interface, with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></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 <a href=#task-source>task
-     source</a> for this task is the <a href=#dom-manipulation-task-source>DOM manipulation task
-     source</a>.</dd>
+     namespace on the <code><a href=#window>Window</a></code> object of the <a href=#browsing-context>browsing
+     context</a>, using the <code><a href=#popstateevent>PopStateEvent</a></code> interface,
+     with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></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 <a href=#task-source>task source</a> for this task is the
+     <a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</dd>
 
      <dt>Otherwise</dt>
 
@@ -38250,10 +38262,7 @@
 
   </ol><p>The <a href=#pending-state-object>pending state object</a> must be initially null.</p>
 
-  <!-- XXX onpopstate should be defined somewhere -->
-
-
-  <pre class=idl>interface <dfn id=popstateevent>PopStateEvent</dfn> : Event {
+  <hr><pre class=idl>interface <dfn id=popstateevent>PopStateEvent</dfn> : Event {
   readonly attribute any <a href=#dom-popstateevent-state title=dom-PopStateEvent-state>state</a>;
   void <a href=#dom-popstateevent-initpopstateevent title=dom-PopStateEvent-initPopStateEvent>initPopStateEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any stateArg);
   void <a href=#dom-popstateevent-initpopstateeventns title=dom-PopStateEvent-initPopStateEventNS>initPopStateEventNS</a>(in DOMString namespaceURIArg, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any stateArg);
@@ -39166,9 +39175,9 @@
    and the two share the same <code>Document</code> object, then
    first, if the <code>Document</code>'s <a href=#current-document-readiness>current document
    readiness</a> is the string "complete", then <a href=#fire-a-simple-event>fire a simple
-   event</a> with the name <code title=event-hashchange>hashchange</code> at <a href=#the-body-element-1>the
-   <code>body</code> element</a>; and second, if the new URL has a
-   fragment identifier, <a href=#scroll-to-the-fragment-identifier>scroll to the fragment
+   event</a> with the name <code title=event-hashchange>hashchange</code> at the <a href=#browsing-context>browsing
+   context</a>'s <code><a href=#window>Window</a></code> object; and second, if the new
+   URL has a fragment identifier, <a href=#scroll-to-the-fragment-identifier>scroll to the fragment
    identifier</a>.</li>
 
    <li><p>User agents may also update other aspects of the document
@@ -39196,8 +39205,9 @@
    <code><a href=#beforeunloadevent>BeforeUnloadEvent</a></code> event object with the name <code title=event-beforeunload>beforeunload</code>, with no namespace,
    which does not bubble but is cancelable.</li>
 
-   <li><p>Dispatch <var title="">event</var> at <a href=#the-body-element-1>the
-   <code>body</code> element</a>.</li>
+   <li><p>Dispatch <var title="">event</var> at the
+   <code><a href=#window>Window</a></code> object of the <code>Document</code>'s
+   <a href=#browsing-context>browsing context</a>.</li>
 
    <li><p>If any event listeners were triggered by the previous step,
    then set <var title="">salvageable</var> to false.</li>
@@ -39223,8 +39233,9 @@
 
    </li>
 
-   <li><p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-unload>unload</code> at <a href=#the-body-element-1>the <code>body</code>
-   element</a>.</li>
+   <li><p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-unload>unload</code> at the <code><a href=#window>Window</a></code>
+   object of the <code>Document</code>'s <a href=#browsing-context>browsing
+   context</a>.</li>
 
    <li><p>If any event listeners were triggered by the previous step,
    then set <var title="">salvageable</var> to false.</li>
@@ -39579,14 +39590,17 @@
   definitions are wrong -->
 
   <p>The <dfn id=event-storage title=event-storage><code>storage</code></dfn> event
-  is fired in an <code><a href=#htmldocument>HTMLDocument</a></code> when a storage area
-  changes, as described in the previous two sections (<a href=#sessionStorageEvent>for session storage</a>, <a href=#localStorageEvent>for local storage</a>).</p>
+  is fired when a storage area changes, as described in the previous
+  two sections (<a href=#sessionStorageEvent>for session
+  storage</a>, <a href=#localStorageEvent>for local
+  storage</a>).</p>
 
   <p>When this happens, the user agent must dispatch an event with the
   name <code><a href=#storage-0>storage</a></code>, with no namespace, which does not bubble
   but is cancelable, and which uses the <code><a href=#storageevent>StorageEvent</a></code>
-  interface, at <a href=#the-body-element-1>the body element</a> of each <a href=#active-document title="active document">active</a> <code><a href=#htmldocument>HTMLDocument</a></code>
-  object affected.</p>
+  interface, at each <code><a href=#window>Window</a></code> object whose <a href=#active-document>active
+  document</a> has a <code><a href=#storage-0>Storage</a></code> object that is
+  affected.</p>
 
   <p>If the event is being fired due to an invocation of the
   <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code> or <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code> methods, the
@@ -52695,17 +52709,18 @@
   <ol><li><a href=#queue-a-task>Queue a task</a> to set the <a href=#current-document-readiness>current document
    readiness</a> to "complete".</li>
 
-   <li><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-load-event title="fire a load
-   event">fire a <code title=event-load>load</code> event</a> at
-   <a href=#the-body-element-1>the <code>body</code> element</a>.</li>
+   <li>If the <code>Document</code> is in a <a href=#browsing-context>browsing
+   context</a>, then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-load-event title="fire
+   a load event">fire a <code title=event-load>load</code>
+   event</a> at the <a href=#browsing-context>browsing context</a>'s
+   <code><a href=#window>Window</a></code> object.</li>
 
    <li>If the <code>Document</code> has a <a href=#pending-state-object>pending state
-   object</a>, then <a href=#queue-a-task>queue a task</a> to fire a <code title=event-popstate><a href=#event-popstate>popstate</a></code> event in no namespace on
-   <a href=#the-body-element-1>the body element</a> using the <code><a href=#popstateevent>PopStateEvent</a></code>
-   interface, with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code> attribute set to the
+   object</a>, then <a href=#queue-a-task>queue a task</a> to fire a <code title=event-popstate><a href=#event-popstate>popstate</a></code> event in no namespace on the
+   <a href=#browsing-context>browsing context</a>'s <code><a href=#window>Window</a></code> object using
+   the <code><a href=#popstateevent>PopStateEvent</a></code> interface, with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code> attribute set to the
    current value of the <a href=#pending-state-object>pending state object</a>. This event
-   must bubble but not be cancelable and has no default
-   action.</li>
+   must bubble but not be cancelable and has no default action.</li>
 
   </ol><p>The <a href=#task-source>task source</a> for these tasks is the <a href=#dom-manipulation-task-source>DOM
   manipulation task source</a>.</p>

Modified: source
===================================================================
--- source	2009-01-21 11:08:03 UTC (rev 2685)
+++ source	2009-01-21 11:34:10 UTC (rev 2686)
@@ -8195,7 +8195,8 @@
     characters just inserted into the input stream. (The
     <code>Document</code> node will have been populated with elements
     and a <code title="event-load">load</code> event will have fired
-    on <span title="the body element">its body element</span>.)</p>
+    on its <span>browsing context</span>'s <code>Window</code>
+    object.)</p>
 
    </li>
 
@@ -11127,8 +11128,9 @@
    <dd><code title="handler-window-onhashchange">onhashchange</code></dd>
    <dd><code title="handler-window-onload">onload</code></dd>
    <dd><code title="handler-window-onmessage">onmessage</code></dd>
+   <dd><code title="handler-window-onoffline">onoffline</code></dd>
    <dd><code title="handler-window-ononline">ononline</code></dd>
-   <dd><code title="handler-window-onoffline">onoffline</code></dd>
+   <dd><code title="handler-window-onpopstate">onpopstate</code></dd>
    <dd><code title="handler-window-onresize">onresize</code></dd>
    <dd><code title="handler-window-onstorage">onstorage</code></dd>
    <dd><code title="handler-window-onunload">onunload</code></dd>
@@ -11136,12 +11138,13 @@
    <dd>
 <pre class="idl">interface <dfn>HTMLBodyElement</dfn> : <span>HTMLElement</span> {
            attribute <span>Function</span> <span title="handler-window-onbeforeunload">onbeforeunload</span>;
-           attribute <span>Function</span> <span title="handler-window-onerror">onerror</span>;
+           attribute any     <!--      --> <span title="handler-window-onerror">onerror</span>;
            attribute <span>Function</span> <span title="handler-window-onhashchange">onhashchange</span>;
            attribute <span>Function</span> <span title="handler-window-onload">onload</span>;
            attribute <span>Function</span> <span title="handler-window-onmessage">onmessage</span>;
+           attribute <span>Function</span> <span title="handler-window-onoffline">onoffline</span>;
            attribute <span>Function</span> <span title="handler-window-ononline">ononline</span>;
-           attribute <span>Function</span> <span title="handler-window-onoffline">onoffline</span>;
+           attribute <span>Function</span> <span title="handler-window-onpopstate">onpopstate</span>;
            attribute <span>Function</span> <span title="handler-window-onresize">onresize</span>;
            attribute <span>Function</span> <span title="handler-window-onstorage">onstorage</span>;
            attribute <span>Function</span> <span title="handler-window-onunload">onunload</span>;
@@ -38270,6 +38273,9 @@
            attribute <span>Function</span> <span title="handler-onmouseover">onmouseover</span>;
            attribute <span>Function</span> <span title="handler-onmouseup">onmouseup</span>;
            attribute <span>Function</span> <span title="handler-onmousewheel">onmousewheel</span>;
+           attribute <span>Function</span> <span title="handler-window-ononline">ononline</span>;
+           attribute <span>Function</span> <span title="handler-window-onoffline">onoffline</span>;
+           attribute <span>Function</span> <span title="handler-window-onpopstate">onpopstate</span>;
            attribute <span>Function</span> <span title="handler-window-onresize">onresize</span>;
            attribute <span>Function</span> <span title="handler-onscroll">onscroll</span>;
            attribute <span>Function</span> <span title="handler-onselect">onselect</span>;
@@ -40357,6 +40363,12 @@
    title="event-online">online</code> event is targeted at or bubbles
    through the object.</p></dd>
 
+   <dt><dfn title="handler-window-onpopstate"><code>onpopstate</code></dfn></dt> <!-- new -->
+
+   <dd><p>Must be invoked whenever a <code
+   title="event-popstate">popstate</code> event is targeted at or bubbles
+   through the object.</p></dd>
+
    <dt><dfn title="handler-window-onresize"><code>onresize</code></dfn></dt> <!-- widely used -->
 
    <dd><p>Must be invoked whenever a <code
@@ -43264,15 +43276,15 @@
   title="dom-navigator-onLine">navigator.onLine</code> attribute of
   the <code>Window</code> changes from true to false, the user agent
   must <span>fire a simple event</span> called <dfn
-  title="event-offline"><code>offline</code></dfn> at <span>the body
-  element</span>.</p>
+  title="event-offline"><code>offline</code></dfn> at the
+  <code>Window</code> object.</p>
 
   <p>On the other hand, when the value that would be returned by the
   <code title="dom-navigator-onLine">navigator.onLine</code> attribute
   of the <code>Window</code> changes from false to true, the user
   agent must <span>fire a simple event</span> called <dfn
-  title="event-online"><code>online</code></dfn> at <span>the body
-  element</span>.</p>
+  title="event-online"><code>online</code></dfn> at the
+  <code>Window</code> object.</p>
 
   <p class="note">This attribute is inherently unreliable. A computer
   can be connected to a network without having Internet access.</p>
@@ -43551,13 +43563,13 @@
 
      <dd><p><span>Queue a task</span> to fire a <dfn
      title="event-popstate"><code>popstate</code></dfn> event in no
-     namespace on <span>the body element</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 <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>
 
      <dt>Otherwise</dt>
 
@@ -43577,9 +43589,8 @@
 
   <p>The <span>pending state object</span> must be initially null.</p>
 
-  <!-- XXX onpopstate should be defined somewhere -->
+  <hr>
 
-
   <pre class="idl">interface <dfn>PopStateEvent</dfn> : Event {
   readonly attribute any <span title="dom-PopStateEvent-state">state</span>;
   void <span title="dom-PopStateEvent-initPopStateEvent">initPopStateEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any stateArg);
@@ -44626,9 +44637,9 @@
    first, if the <code>Document</code>'s <span>current document
    readiness</span> is the string "complete", then <span>fire a simple
    event</span> with the name <code
-   title="event-hashchange">hashchange</code> at <span>the
-   <code>body</code> element</span>; and second, if the new URL has a
-   fragment identifier, <span>scroll to the fragment
+   title="event-hashchange">hashchange</code> at the <span>browsing
+   context</span>'s <code>Window</code> object; and second, if the new
+   URL has a fragment identifier, <span>scroll to the fragment
    identifier</span>.</p></li>
 
    <li><p>User agents may also update other aspects of the document
@@ -44663,8 +44674,9 @@
    title="event-beforeunload">beforeunload</code>, with no namespace,
    which does not bubble but is cancelable.</p></li>
 
-   <li><p>Dispatch <var title="">event</var> at <span>the
-   <code>body</code> element</span>.</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>
 
    <li><p>If any event listeners were triggered by the previous step,
    then set <var title="">salvageable</var> to false.</p></li>
@@ -44693,8 +44705,9 @@
    </li>
 
    <li><p><span>Fire a simple event</span> called <code
-   title="event-unload">unload</code> at <span>the <code>body</code>
-   element</span>.</p></li>
+   title="event-unload">unload</code> at the <code>Window</code>
+   object of the <code>Document</code>'s <span>browsing
+   context</span>.</p></li>
 
    <li><p>If any event listeners were triggered by the previous step,
    then set <var title="">salvageable</var> to false.</p></li>
@@ -45085,17 +45098,17 @@
   definitions are wrong -->
 
   <p>The <dfn title="event-storage"><code>storage</code></dfn> event
-  is fired in an <code>HTMLDocument</code> when a storage area
-  changes, as described in the previous two sections (<a
-  href="#sessionStorageEvent">for session storage</a>, <a
-  href="#localStorageEvent">for local storage</a>).</p>
+  is fired when a storage area changes, as described in the previous
+  two sections (<a href="#sessionStorageEvent">for session
+  storage</a>, <a href="#localStorageEvent">for local
+  storage</a>).</p>
 
   <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 <span>the body element</span> of each <span
-  title="active document">active</span> <code>HTMLDocument</code>
-  object affected.</p>
+  interface, at each <code>Window</code> object whose <span>active
+  document</span> has a <code>Storage</code> object that is
+  affected.</p>
 
   <p>If the event is being fired due to an invocation of the
   <code title="dom-Storage-setItem">setItem()</code> or <code
@@ -60024,19 +60037,20 @@
    <li><span>Queue a task</span> to set the <span>current document
    readiness</span> to "complete".</li>
 
-   <li><span>Queue a task</span> to <span title="fire a load
-   event">fire a <code title="event-load">load</code> event</span> at
-   <span>the <code>body</code> element</span>.</li>
+   <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>
 
    <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
-   <span>the body element</span> using the <code>PopStateEvent</code>
-   interface, with the <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
    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>
+   must bubble but not be cancelable and has no default action.</li>
 
   </ol>
 




More information about the Commit-Watchers mailing list