spec/Overview.html 1.1856 2686 Make sure to fire the relevant events on

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. (whatwg r2686)

5.9.10 Unloading documents
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#unloading-documents
5.8.3 Activating state object entries
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#activating-state-object-entries
popstate
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#event-popstate
storage
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#event-storage
pending state object
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#pending-state-object
session history
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#session-history
HTMLBodyElement
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#htmlbodyelement
Window
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#window
delays the load event
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#delay-the-load-event
When the setItem(), removeItem(), and clear() methods are called on a Storage object x that is associated with a local storage area, if the methods did something, then in every HTMLDocument object whose Window object's localStorage attribute's Storage object is associated with the same storage area, other than x, a storage event must be fired, as described below.
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#localStorageEvent
onresize
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#handler-window-onresize
offline
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#event-offline
5.10.1.5 The storage event
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#the-storage-event
refused to allow the document to be unloaded
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#refused-to-allow-the-document-to-be-unloaded
ononline
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#handler-window-ononline
online
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#event-online
The user agent must make the specified entry's Document object the active document of the browsing context. (If it is a top-level browsing context, this might change which application cache it is associated with.)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#appcache-history-2
4.4.1 The body element
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#the-body-element
onpopstate
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#handler-window-onpopstate
5.7.7 Browser state
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#browser-state
innerHTML
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#dom-innerhtml-html
PopStateEvent
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#popstateevent
5.8 Session history and navigation
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1856.html#history

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1855&r2=1.1856&f=h
http://html5.org/tools/web-apps-tracker?from=2685&to=2686

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1855
retrieving revision 1.1856
diff -u -d -r1.1855 -r1.1856
--- Overview.html 21 Jan 2009 11:08:09 -0000 1.1855
+++ Overview.html 21 Jan 2009 11:34:15 -0000 1.1856
@@ -6485,7 +6485,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>
 
@@ -8591,8 +8592,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-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-ononline><a href=#handler-window-ononline>ononline</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>
@@ -8600,12 +8602,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-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-ononline title=handler-window-ononline>ononline</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>;
@@ -27312,6 +27315,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>;
@@ -28798,6 +28804,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
@@ -31013,12 +31024,12 @@
   remote page (or knows that such an attempt would fail), and must
   return true otherwise.<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>On the other hand, when the value that would be returned by the
+  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>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 class=note>This attribute is inherently unreliable. A computer
+  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 class=note>This attribute is inherently unreliable. A computer
   can be connected to a network without having Internet access.<h3 id=history><span class=secno>5.8 </span>Session history and navigation</h3><h4 id=the-session-history-of-browsing-contexts><span class=secno>5.8.1 </span>The session history of browsing contexts</h4><p>The sequence of <code>Document</code>s in a <a href=#browsing-context>browsing
   context</a> is its <dfn id=session-history>session history</dfn>.<p><code><a href=#history-1>History</a></code> objects provide a representation of the
   pages in the session history of <a href=#browsing-context title="browsing
@@ -31174,12 +31185,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>
 
@@ -31192,7 +31204,7 @@
 
     </dl></li>
 
-  </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 {
+  </ol><p>The <a href=#pending-state-object>pending state object</a> must be initially null.</p><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);
@@ -31912,9 +31924,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
@@ -31934,8 +31946,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>
@@ -31961,8 +31974,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>
@@ -32191,12 +32205,15 @@
   attribute's <code><a href=#storage-0>Storage</a></code> object is associated with the same
   storage area, other than <var title="">x</var>, a <code title=event-storage><a href=#event-storage>storage</a></code> event must be fired, as <a href=#event-storage title=event-storage>described below</a>.<h5 id=the-storage-event><span class=secno>5.10.1.5 </span>The <code title=event-storage><a href=#event-storage>storage</a></code> event</h5><!-- XXX fix up for workers: target is wrong, source and storageArea
   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>When this happens, the user agent must dispatch an event with the
+  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>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>If the event is being fired due to an invocation of the
+  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>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
   event must have its <code title=dom-StorageEvent-key><a href=#dom-storageevent-key>key</a></code>
   attribute set to the name of the key in question, its <code title=dom-StorageEvent-oldValue><a href=#dom-storageevent-oldvalue>oldValue</a></code> attribute set to
@@ -42919,17 +42936,18 @@
   following steps:<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><!-- XXX make sure things "delay the load event" --><p class=XXX>delaying the load event for things like image

Received on Wednesday, 21 January 2009 11:38:10 UTC