- From: poot <cvsmail@w3.org>
- Date: Tue, 23 Feb 2010 20:29:31 +0900 (JST)
- To: public-html-diffs@w3.org
hixie: Make pageshow/pagehide use PageTransitionEvent, to match reality
as described by zcorpan. (whatwg r4800)
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.3846&r2=1.3847&f=h
http://html5.org/tools/web-apps-tracker?from=4799&to=4800
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.3846
retrieving revision 1.3847
diff -u -d -r1.3846 -r1.3847
--- Overview.html 23 Feb 2010 11:24:14 -0000 1.3846
+++ Overview.html 23 Feb 2010 11:29:19 -0000 1.3847
@@ -42374,9 +42374,14 @@
<li><p>If the <a href="#current-document-readiness">current document readiness</a> of the
<i>specified entry</i>'s <code><a href="#document">Document</a></code> is "complete",
- <a href="#queue-a-task">queue a task</a> to <a href="#fire-a-simple-event">fire a simple event</a>
- named <code title="event-pageshow">pageshow</code> at that
- <code><a href="#document">Document</a></code>'s <code><a href="#window">Window</a></code> object.</li>
+ <a href="#queue-a-task">queue a task</a> to fire a <code title="event-pageshow"><a href="#event-pageshow">pageshow</a></code> event at the
+ <code><a href="#window">Window</a></code> object of that <code><a href="#document">Document</a></code>, but
+ with its <code title="dom-event-target">target</code> set to the
+ <code><a href="#document">Document</a></code> object (and the <code title="dom-event-currentTarget">currentTarget</code> set to the
+ <code><a href="#window">Window</a></code> object), using the
+ <code><a href="#pagetransitionevent">PageTransitionEvent</a></code> interface, with the <code title="dom-PageTransitionEvent-persisted"><a href="#dom-pagetransitionevent-persisted">persisted</a></code>
+ attribute set to true. This event must not bubble, must not be
+ cancelable, and has no default action.</li>
</ol></li>
@@ -42526,6 +42531,30 @@
the URL of the <a href="#session-history-entry">session history entry</a> that was traversed
to.</p>
+ </div><hr><p>The <dfn id="event-pageshow" title="event-pageshow"><code>pageshow</code></dfn> event
+ is fired when traversing <em>to</em> a <a href="#session-history-entry">session history
+ entry</a>.<p>The <dfn id="event-pagehide" title="event-pagehide"><code>pagehide</code></dfn>
+ event is fired when traversing <em>from</em> a <a href="#session-history-entry">session history
+ entry</a>.<pre class="idl">interface <dfn id="pagetransitionevent">PageTransitionEvent</dfn> : <a href="#event">Event</a> {
+ readonly attribute any <a href="#dom-pagetransitionevent-persisted" title="dom-PageTransitionEvent-persisted">persisted</a>;
+ void <a href="#dom-pagetransitionevent-initpagetransitionevent" title="dom-PageTransitionEvent-initPageTransitionEvent">initPageTransitionEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any persistedArg);
+};</pre><dl class="domintro"><dt><var title="">event</var> . <code title="dom-PageTransitionEvent-persisted"><a href="#dom-pagetransitionevent-persisted">persisted</a></code></dt>
+
+ <dd>
+
+ <p>Returns false if the page is newly being loaded (and the <code title="event-load">load</code> event will fire). Otherwise, returns true.</p>
+
+ </dd>
+
+ </dl><div class="impl">
+
+ <p>The <dfn id="dom-pagetransitionevent-initpagetransitionevent" title="dom-PageTransitionEvent-initPageTransitionEvent"><code>initPageTransitionEvent()</code></dfn>
+ method must initialize the event in a manner analogous to the
+ similarly-named method in the DOM Events interfaces. <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+
+ <p>The <dfn id="dom-pagetransitionevent-persisted" title="dom-PageTransitionEvent-persisted"><code>persisted</code></dfn>
+ attribute represents the context information for the event.</p>
+
</div><h4 id="unloading-documents"><span class="secno">5.5.10 </span>Unloading documents</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><div class="impl">
<p>A <code><a href="#document">Document</a></code> has a <var title="concept-document-salvageable">salvageable</var> state, which
@@ -42603,8 +42632,14 @@
whether the <code><a href="#document">Document</a></code> object is going to be
re-used. (This is set by the <code title="dom-document-open"><a href="#dom-document-open">document.open()</a></code> method.)</p>
- <ol><li><p><a href="#fire-a-simple-event">Fire a simple event</a> named <code title="event-pagehide">pagehide</code> at the
- <code><a href="#document">Document</a></code>'s <code><a href="#window">Window</a></code> object.</li>
+ <ol><li><p>Fire a <code title="event-pagehide"><a href="#event-pagehide">pagehide</a></code> event at
+ the <code><a href="#window">Window</a></code> object of the <code><a href="#document">Document</a></code>, but
+ with its <code title="dom-event-target">target</code> set to the
+ <code><a href="#document">Document</a></code> object (and the <code title="dom-event-currentTarget">currentTarget</code> set to the
+ <code><a href="#window">Window</a></code> object), using the
+ <code><a href="#pagetransitionevent">PageTransitionEvent</a></code> interface, with the <code title="dom-PageTransitionEvent-persisted"><a href="#dom-pagetransitionevent-persisted">persisted</a></code>
+ attribute set to true. This event must not bubble, must not be
+ cancelable, and has no default action.</li>
<li><p><i>Unload event</i>: <a href="#fire-a-simple-event">Fire a simple event</a> named
<code title="event-unload">unload</code> at the
@@ -45587,8 +45622,8 @@
<tr><td><dfn id="handler-window-onmessage" title="handler-window-onmessage"><code>onmessage</code></dfn> <td> <code title="event-message">message</code> <!-- new for postMessage -->
<tr><td><dfn id="handler-window-onoffline" title="handler-window-onoffline"><code>onoffline</code></dfn> <td> <code title="event-offline"><a href="#event-offline">offline</a></code> <!-- new -->
<tr><td><dfn id="handler-window-ononline" title="handler-window-ononline"><code>ononline</code></dfn> <td> <code title="event-online"><a href="#event-online">online</a></code> <!-- new -->
- <tr><td><dfn id="handler-window-onpagehide" title="handler-window-onpagehide"><code>onpagehide</code></dfn> <td> <code title="event-pagehide">pagehide</code> <!-- new -->
- <tr><td><dfn id="handler-window-onpageshow" title="handler-window-onpageshow"><code>onpageshow</code></dfn> <td> <code title="event-pageshow">pageshow</code> <!-- new -->
+ <tr><td><dfn id="handler-window-onpagehide" title="handler-window-onpagehide"><code>onpagehide</code></dfn> <td> <code title="event-pagehide"><a href="#event-pagehide">pagehide</a></code> <!-- new -->
+ <tr><td><dfn id="handler-window-onpageshow" title="handler-window-onpageshow"><code>onpageshow</code></dfn> <td> <code title="event-pageshow"><a href="#event-pageshow">pageshow</a></code> <!-- new -->
<tr><td><dfn id="handler-window-onpopstate" title="handler-window-onpopstate"><code>onpopstate</code></dfn> <td> <code title="event-popstate"><a href="#event-popstate">popstate</a></code> <!-- new -->
<tr><td><dfn id="handler-window-onredo" title="handler-window-onredo"><code>onredo</code></dfn> <td> <code title="event-redo"><a href="#event-redo">redo</a></code> <!-- new -->
<tr><td><dfn id="handler-window-onresize" title="handler-window-onresize"><code>onresize</code></dfn> <td> <code title="event-resize">resize</code> <!-- widely used --> <!-- [CSSOM] -->
@@ -58027,9 +58062,14 @@
<code><a href="#window">Window</a></code> object).</li>
<li><p>If the <code><a href="#document">Document</a></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-simple-event">fire a
- simple event</a> named <code title="event-pageshow">pageshow</code> at the
- <code><a href="#document">Document</a></code>'s <code><a href="#window">Window</a></code> object.</li>
+ context</a>, then <a href="#queue-a-task">queue a task</a> to fire a <code title="event-pageshow"><a href="#event-pageshow">pageshow</a></code> event at the
+ <code><a href="#window">Window</a></code> object of the <code><a href="#document">Document</a></code>, but with
+ its <code title="dom-event-target">target</code> set to the
+ <code><a href="#document">Document</a></code> object (and the <code title="dom-event-currentTarget">currentTarget</code> set to the
+ <code><a href="#window">Window</a></code> object), using the
+ <code><a href="#pagetransitionevent">PageTransitionEvent</a></code> interface, with the <code title="dom-PageTransitionEvent-persisted"><a href="#dom-pagetransitionevent-persisted">persisted</a></code>
+ attribute set to false. This event must not bubble, must not be
+ cancelable, and has no default action.</li>
<li><p>If the <code><a href="#document">Document</a></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 at the
@@ -67539,12 +67579,12 @@
<tr><th> <code title="">onpagehide</code>
<td> <code title="handler-window-onpagehide"><a href="#handler-window-onpagehide">body</a></code>
- <td> <code title="event-pagehide">pagehide</code> event handler for <code><a href="#window">Window</a></code> object
+ <td> <code title="event-pagehide"><a href="#event-pagehide">pagehide</a></code> event handler for <code><a href="#window">Window</a></code> object
<td> <a href="#event-handler-content-attributes" title="event handler content attributes">Event handler content attribute</a>
<tr><th> <code title="">onpageshow</code>
<td> <code title="handler-window-onpageshow"><a href="#handler-window-onpageshow">body</a></code>
- <td> <code title="event-pageshow">pageshow</code> event handler for <code><a href="#window">Window</a></code> object
+ <td> <code title="event-pageshow"><a href="#event-pageshow">pageshow</a></code> event handler for <code><a href="#window">Window</a></code> object
<td> <a href="#event-handler-content-attributes" title="event handler content attributes">Event handler content attribute</a>
<tr><th> <code title="">onpopstate</code>
@@ -68049,12 +68089,12 @@
<td> <code><a href="#event">Event</a></code>
<td> Fired at the <code><a href="#window">Window</a></code> when the network connections returns
- <tr><td> <code title="event-pagehide">pagehide</code>
- <td> <code><a href="#event">Event</a></code>
+ <tr><td> <code title="event-pagehide"><a href="#event-pagehide">pagehide</a></code>
+ <td> <code><a href="#pagetransitionevent">PageTransitionEvent</a></code>
<td> Fired at the <code><a href="#window">Window</a></code> when the page's entry in the <a href="#session-history">session history</a> stops being the <a href="#current-entry">current entry</a>
- <tr><td> <code title="event-pageshow">pageshow</code>
- <td> <code><a href="#event">Event</a></code>
+ <tr><td> <code title="event-pageshow"><a href="#event-pageshow">pageshow</a></code>
+ <td> <code><a href="#pagetransitionevent">PageTransitionEvent</a></code>
<td> Fired at the <code><a href="#window">Window</a></code> when the page's entry in the <a href="#session-history">session history</a> becomes the <a href="#current-entry">current entry</a>
<tr><td> <code title="event-popstate"><a href="#event-popstate">popstate</a></code>
Received on Tuesday, 23 February 2010 11:30:00 UTC