HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2686

File a bug

SVNBugCommentTime (UTC)
2686[Gecko] [Internet Explorer] [Opera] [Webkit] 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.2009-01-21 11:34
Index: source
===================================================================
--- source	(revision 2685)
+++ source	(revision 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>
 

|