html5/spec Overview.html,1.3691,1.3692

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv9261

Modified Files:
	Overview.html 
Log Message:
Make history traversal unrelated to history truncation always async. Make popstate/hashchange async. Add context information to hashchange. (whatwg r4632)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.3691
retrieving revision 1.3692
diff -u -d -r1.3691 -r1.3692
--- Overview.html	27 Jan 2010 23:06:57 -0000	1.3691
+++ Overview.html	29 Jan 2010 01:31:45 -0000	1.3692
@@ -262,7 +262,7 @@
    <h1>HTML5</h1>
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
 
-   <h2 class="no-num no-toc" id="editor-s-draft-27-january-2010">Editor's Draft 27 January 2010</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-29-january-2010">Editor's Draft 29 January 2010</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -361,7 +361,7 @@
   specification's progress along the W3C Recommendation
   track.
 
-  This specification is the 27 January 2010 Editor's Draft.
+  This specification is the 29 January 2010 Editor's Draft.
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is part of <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">a
   larger specification</a> being produced by the <a href="http://www.whatwg.org/">WHATWG</a>.
   <!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST -->
@@ -890,11 +890,10 @@
     <ol>
      <li><a href="#the-session-history-of-browsing-contexts"><span class="secno">5.10.1 </span>The session history of browsing contexts</a></li>
      <li><a href="#the-history-interface"><span class="secno">5.10.2 </span>The <code>History</code> interface</a></li>
-     <li><a href="#activating-state-object-entries"><span class="secno">5.10.3 </span>Activating state object entries</a></li>
-     <li><a href="#the-location-interface"><span class="secno">5.10.4 </span>The <code>Location</code> interface</a>
+     <li><a href="#the-location-interface"><span class="secno">5.10.3 </span>The <code>Location</code> interface</a>
       <ol>
-       <li><a href="#security-3"><span class="secno">5.10.4.1 </span>Security</a></ol></li>
-     <li><a href="#history-notes"><span class="secno">5.10.5 </span>Implementation notes for session history</a></ol></li>
+       <li><a href="#security-3"><span class="secno">5.10.3.1 </span>Security</a></ol></li>
+     <li><a href="#history-notes"><span class="secno">5.10.4 </span>Implementation notes for session history</a></ol></li>
    <li><a href="#browsing-the-web"><span class="secno">5.11 </span>Browsing the Web</a>
     <ol>
      <li><a href="#navigating-across-documents"><span class="secno">5.11.1 </span>Navigating across documents</a></li>
@@ -905,7 +904,9 @@
      <li><a href="#read-plugin"><span class="secno">5.11.6 </span>Page load processing model for content that uses plugins</a></li>
      <li><a href="#read-ua-inline"><span class="secno">5.11.7 </span>Page load processing model for inline content that doesn't have a DOM</a></li>
      <li><a href="#scroll-to-fragid"><span class="secno">5.11.8 </span>Navigating to a fragment identifier</a></li>
-     <li><a href="#history-traversal"><span class="secno">5.11.9 </span>History traversal</a></li>
+     <li><a href="#history-traversal"><span class="secno">5.11.9 </span>History traversal</a>
+      <ol>
+       <li><a href="#event-definitions"><span class="secno">5.11.9.1 </span>Event definitions</a></ol></li>
      <li><a href="#unloading-documents"><span class="secno">5.11.10 </span>Unloading documents</a>
       <ol>
        <li><a href="#event-definition"><span class="secno">5.11.10.1 </span>Event definition</a></ol></li>
@@ -8485,20 +8486,19 @@
 
    </li>
 
+   <li><p>Remove any <a href="#concept-task" title="concept-task">tasks</a> queued by
+   the <a href="#history-traversal-task-source">history traversal task source</a>.</li>
+
    <li>Remove any earlier entries that share the same
    <code>Document</code>.</li>
 
-   <li>
-
-    <p>If <var title="">replace</var> is false, then add a new entry,
-    just before the last entry, and assocaite with the new entry the
-    text that was parsed by the previous parser associated with the
-    <code>Document</code> object, as well as the state of the document
-    at the start of these steps. (This allows the user to step
-    backwards in the session history to see the page before it was
-    blown away by the <code title="dom-document-open"><a href="#dom-document-open">document.open()</a></code> call.)</p>
-
-   </li>
+   <li><p>If <var title="">replace</var> is false, then add a new
+   entry, just before the last entry, and associate with the new entry
+   the text that was parsed by the previous parser associated with the
+   <code>Document</code> object, as well as the state of the document
+   at the start of these steps. (This allows the user to step
+   backwards in the session history to see the page before it was
+   blown away by the <code title="dom-document-open"><a href="#dom-document-open">document.open()</a></code> call.)</li>
 
    <li><p>Finally, set the <a href="#insertion-point">insertion point</a> to point at
    just before the end of the <a href="#the-input-stream">input stream</a> (which at this
@@ -17696,8 +17696,10 @@
   its <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute is set,
   changed, or removed: the user agent must <a href="#queue-a-task">queue a task</a>
   to run the following steps to (re)determine what the
-  <code><a href="#the-object-element">object</a></code> element represents:</p>
-  <!-- Changing the base URL doesn't trigger this. -->
+  <code><a href="#the-object-element">object</a></code> element represents. The <a href="#task-source">task source</a>
+  for this <a href="#concept-task" title="concept-task">task</a> is the <a href="#dom-manipulation-task-source">DOM
+  manipulation task source</a>.</p> <!-- Changing the base URL
+  doesn't trigger this. -->
 
   <ol><li>
 
@@ -18048,10 +18050,7 @@
    <a href="#fallback-content">fallback content</a>. If the element has an instantiated
    <a href="#plugin">plugin</a>, then unload it.</li>
 
-  </ol><p>The <a href="#task-source">task source</a> for the <a href="#concept-task" title="concept-task">task</a> above is the <a href="#dom-manipulation-task-source">DOM manipulation
-  task source</a>.</p>
-
-  <p id="object-plugin">When the algorithm above instantiates a
+  </ol><p id="object-plugin">When the algorithm above instantiates a
   <a href="#plugin">plugin</a>, the user agent should pass the names and values
   of all the attributes on the element, and <!-- then a parameter
   named "PARAM" whose value is null, and then --> all the names and
@@ -39714,6 +39713,15 @@
 
    </dd>
 
+   <dt>The <dfn id="history-traversal-task-source">history traversal task source</dfn></dt>
+
+   <dd>
+
+    <p>This <a href="#task-source">task source</a> is used to queue calls to <code title="dom-history-back"><a href="#dom-history-back">history.back()</a></code> and similar
+    APIs.</p>
+
+   </dd>
+
   </dl></div><div class="impl">
 
   <!-- SCRIPT EXEC -->
@@ -40132,7 +40140,7 @@
     <tr><td><dfn id="handler-window-onblur" title="handler-window-onblur"><code>onblur</code></dfn> <td> <code title="event-blur">blur</code>
     <tr><td><dfn id="handler-window-onerror" title="handler-window-onerror"><code>onerror</code></dfn> <td> <code title="event-error">error</code>
     <tr><td><dfn id="handler-window-onfocus" title="handler-window-onfocus"><code>onfocus</code></dfn> <td> <code title="event-focus">focus</code>
-    <tr><td><dfn id="handler-window-onhashchange" title="handler-window-onhashchange"><code>onhashchange</code></dfn> <td> <code title="event-hashchange">hashchange</code> <!-- new -->
+    <tr><td><dfn id="handler-window-onhashchange" title="handler-window-onhashchange"><code>onhashchange</code></dfn> <td> <code title="event-hashchange"><a href="#event-hashchange">hashchange</a></code> <!-- new -->
     <tr><td><dfn id="handler-window-onload" title="handler-window-onload"><code>onload</code></dfn> <td> <code title="event-load">load</code> <!-- widely used -->
     <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 -->
@@ -43400,14 +43408,26 @@
 
   <p>The actual entries are not accessible from script.</p>
 
-  <p>The <dfn id="dom-history-go" title="dom-history-go"><code>go(<var title="">delta</var>)</code></dfn> method causes the UA to run the
-  following steps:</p>
+  <p>When the <dfn id="dom-history-go" title="dom-history-go"><code>go(<var title="">delta</var>)</code></dfn> method is invoked, if the
+  argument to the method was omitted or has the value zero, the user
+  agent must act as if the <code title="dom-location-reload"><a href="#dom-location-reload">location.reload()</a></code> method was
+  called instead. Otherwise, the user agent must <a href="#traverse-the-history-by-a-delta">traverse the
+  history by a delta</a> whose value is the value of the method's
+  argument.</p>
 
-  <ol><li><p>If the argument to the method was omitted or has the value
-   zero, then act as if the <code title="dom-location-reload"><a href="#dom-location-reload">location.reload()</a></code> method was
-   called instead, and abort these steps.</p>
+  <p>When the <dfn id="dom-history-back" title="dom-history-back"><code>back()</code></dfn>
+  method is invoked, the user agent must <a href="#traverse-the-history-by-a-delta">traverse the history by
+  a delta</a> &minus;1.</p>
 
-   <li><p>Let <var title="">delta</var> be the argument to the
+  <p>When the <dfn id="dom-history-forward" title="dom-history-forward"><code>forward()</code></dfn>method is
+  invoked, the user agent must <a href="#traverse-the-history-by-a-delta">traverse the history by a
+  delta</a> +1.</p>
+
+  <p>To <dfn id="traverse-the-history-by-a-delta">traverse the history by a delta</dfn> <var title="">delta</var>, the user agent must <a href="#queue-a-task">queue a task</a>
+  to run the following steps. The <a href="#task-source">task source</a> for the
+  queued task is the <a href="#history-traversal-task-source">history traversal task source</a>.</p>
+
+  <ol><li><p>Let <var title="">delta</var> be the argument to the
    method.</li>
 
    <li><p>If the index of the <a href="#current-entry-of-the-joint-session-history">current entry of the joint session
@@ -43423,24 +43443,17 @@
    <a href="#browsing-context">browsing context</a> of the <var title="">specified
    entry</var>.</li>
 
+   <!-- XXX if going to another doc, try to unload the document here
+   (firing beforeunload, unload, pagehide) -->
+
    <li><p><a href="#traverse-the-history">Traverse the history</a> of the <var title="">specified browsing context</var> to the <var title="">specified entry</var>.</p>
 
   </ol><p>When the user navigates through a <a href="#browsing-context">browsing context</a>,
   e.g. using a browser's back and forward buttons, the user agent must
-  translate this action into the equivalent invocations of the <code title="dom-history-go"><a href="#dom-history-go">history.go(<var title="">delta</var>)</a></code>
-  method on the various affected <code title="dom-window"><a href="#dom-window">window</a></code> objects.</p>
-
-  <p>Some of the other members of the <code><a href="#history-0">History</a></code> interface
-  are defined in terms of the <code title="dom-history-go"><a href="#dom-history-go">go()</a></code>
-  method, as follows:</p>
+  <a href="#traverse-the-history-by-a-delta">traverse the history by a delta</a> equivalent to the
+  action specified by the user.</p>
 
-  <table><tr><th>Member</th>
-    <th>Definition</th>
-   <tr><td><dfn id="dom-history-back" title="dom-history-back"><code>back()</code></dfn></td>
-    <td>Must do the same as <code title="dom-history-go"><a href="#dom-history-go">go(-1)</a></code></td>
-   <tr><td><dfn id="dom-history-forward" title="dom-history-forward"><code>forward()</code></dfn></td>
-    <td>Must do the same as <code title="dom-history-go"><a href="#dom-history-go">go(1)</a></code></td>
-   </table><hr><p>The <dfn id="dom-history-pushstate" title="dom-history-pushState"><code>pushState(<var title="">data</var>, <var title="">title</var>, <var title="">url</var>)</code></dfn> method adds a state object entry to
+  <hr><p>The <dfn id="dom-history-pushstate" title="dom-history-pushState"><code>pushState(<var title="">data</var>, <var title="">title</var>, <var title="">url</var>)</code></dfn> method adds a state object entry to
   the history.</p>
 
   <p>The <dfn id="dom-history-replacestate" title="dom-history-replaceState"><code>replaceState(<var title="">data</var>, <var title="">title</var>, <var title="">url</var>)</code></dfn> method updates the state object,
@@ -43472,12 +43485,12 @@
 
      <li>If the <a href="#origin">origin</a> of the resulting <a href="#absolute-url">absolute
      URL</a> is not the same as the <a href="#origin">origin</a> of the
-     <a href="#entry-script">entry script</a>'s <code title="script's browsing
-     context"><a href="#script-s-browsing-context">browsing context, and either the <span title="url-path">&lt;path&gt;</span> or <span title="url-query">&lt;query&gt;</span> components of the two
-     <span title="URL">URLs</span> comparedi in the previous step
-     differ, raise a <code>SECURITY_ERR</code> exception and abort
+     <a href="#entry-script">entry script</a>'s <a href="#script-s-browsing-context" title="script's browsing
+     context">browsing context</a>, and either the <a href="#url-path" title="url-path">&lt;path&gt;</a> or <a href="#url-query" title="url-query">&lt;query&gt;</a> components of the two
+     <a href="#url" title="URL">URLs</a> comparedi in the previous step
+     differ, raise a <code><a href="#security_err">SECURITY_ERR</a></code> exception and abort
      these steps. (This prevents sandboxed content from spoofing other
-     pages on the same origin.)</a></code></li>
+     pages on the same origin.)</li>
 
     </ol><p>For the purposes of the comparisons in the above substeps, the
     <a href="#url-path" title="url-path">&lt;path&gt;</a> and <a href="#url-query" title="url-query">&lt;query&gt;</a> components can only be the
@@ -43503,6 +43516,9 @@
 
      </li>
 
+     <li><p>Remove any <a href="#concept-task" title="concept-task">tasks</a> queued
+     by the <a href="#history-traversal-task-source">history traversal task source</a>.</li>
+
      <li><p>Add a state object entry to the session history, after the
      <a href="#current-entry">current entry</a>, with <var title="">cloned data</var> as
      the state object, the given <var title="">title</var> as the title,
@@ -43532,7 +43548,7 @@
 
     <p class="note">Since this is neither a <a href="#navigate" title="navigate">navigation</a> of the <a href="#browsing-context">browsing
     context</a> nor a <a href="#traverse-the-history" title="traverse the history">history
-    traversal</a>, it does not cause a <code title="event-hashchange">hashchange</code> event to be fired.</p>
+    traversal</a>, it does not cause a <code title="event-hashchange"><a href="#event-hashchange">hashchange</a></code> event to be fired.</p>
 
    </li>
 
@@ -43639,67 +43655,7 @@
 State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BUTTON ONCLICK="inc()"&gt;
 &lt;/FORM&gt;</pre>
 
-  </div><h4 id="activating-state-object-entries"><span class="secno">5.10.3 </span><dfn title="activate the state object">Activating state object entries</dfn></h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><div class="impl">
-
-  <p>When an entry in the session history is activated (which happens
-  during <a href="#traverse-the-history" title="traverse the history">session history
-  traversal</a>), the user agent must run the following steps:</p>
-
-  <ol><!-- only called for the first entry of a Document set and for
-  state object entries, not for frag id change entries --><li><p>If the entry is a <a href="#state-object">state object</a> entry, let <var title="">state</var> be a <a href="#structured-clone">structured clone</a> of that
-   state object. Otherwise, let <var title="">state</var> be
-   null.</li>
-
-   <li>
-
-    <p>Run the appropriate steps according to the conditions
-    described:</p>
-
-    <dl class="switch"><dt>If the <a href="#current-document-readiness">current document readiness</a> is set to the
-     string "complete"</dt>
-
-     <dd><p>Synchronously fire a <dfn id="event-popstate" title="event-popstate"><code>popstate</code></dfn> event on the
-     <code><a href="#window">Window</a></code> object of the <code>Document</code>, 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.</dd>
-
-     <dt>Otherwise</dt>
-
-     <dd><p>Let the <code>Document</code>'s <dfn id="pending-state-object">pending state
-     object</dfn> be <var title="">state</var>. (If there was already
-     a <a href="#pending-state-object">pending state object</a>, the previous one is
-     discarded.)</p>
-
-     <p class="note">The event will then be fired just after the <code title="event-load">load</code> event.</dd>
-
-    </dl></li>
-
-  </ol><p>The <a href="#pending-state-object">pending state object</a> must be initially null.</p>
-
-  <hr></div><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);
-};</pre><dl class="domintro"><dt><var title="">event</var> . <code title="dom-PopStateEvent-state"><a href="#dom-popstateevent-state">state</a></code></dt>
-
-   <dd>
-
-    <p>Returns the information that was provided to <code title="dom-history-pushState"><a href="#dom-history-pushstate">pushState()</a></code> or <code title="dom-history-replaceState"><a href="#dom-history-replacestate">replaceState()</a></code>.</p>
-
-   </dd>
-
-  </dl><div class="impl">
-
-  <p>The <dfn id="dom-popstateevent-initpopstateevent" title="dom-PopStateEvent-initPopStateEvent"><code>initPopStateEvent()</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-popstateevent-state" title="dom-PopStateEvent-state"><code>state</code></dfn>
-  attribute represents the context information for the event, or null,
-  if the state represented is the initial state of the
-  <code>Document</code>.</p>
-
-  </div><h4 id="the-location-interface"><span class="secno">5.10.4 </span>The <code><a href="#location">Location</a></code> interface</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><p>Each <code>Document</code> object in a <a href="#browsing-context">browsing
+  </div><h4 id="the-location-interface"><span class="secno">5.10.3 </span>The <code><a href="#location">Location</a></code> interface</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><p>Each <code>Document</code> object in a <a href="#browsing-context">browsing
   context</a>'s session history is associated with a unique
   instance of a <code><a href="#location">Location</a></code> object.<dl class="domintro"><dt><var title="">document</var> . <code title="dom-document-location"><a href="#dom-document-location">location</a></code> [ = <var title="">value</var> ]</dt>
    <dt><var title="">window</var> . <code title="dom-location"><a href="#dom-location">location</a></code> [ = <var title="">value</var> ]</dt>
@@ -43890,7 +43846,7 @@
 
   </div><div class="impl">
 
-  <h5 id="security-3"><span class="secno">5.10.4.1 </span>Security</h5><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p>
+  <h5 id="security-3"><span class="secno">5.10.3.1 </span>Security</h5><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p>
 
   <p>User agents must raise a <code><a href="#security_err">SECURITY_ERR</a></code> exception whenever
   any of the members of a <code><a href="#location">Location</a></code> object are accessed by
@@ -43910,7 +43866,7 @@
 
   </ul></div><div class="impl">
 
-  <h4 id="history-notes"><span class="secno">5.10.5 </span>Implementation notes for session history</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p>
+  <h4 id="history-notes"><span class="secno">5.10.4 </span>Implementation notes for session history</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p>
   <!-- don't change the ID without updating multiple internal links -->
 
   <p><i>This section is non-normative.</i></p>
@@ -44343,6 +44299,12 @@
 
        </li>
 
+       <li><p>Remove any <a href="#concept-task" title="concept-task">tasks</a>
+       queued by the <a href="#history-traversal-task-source">history traversal task
+       source</a>.</li> <!-- so the network is racing
+       history.back(), in the case of setting location.href="" and
+       then calling history.back() -->
+
        <li><p>Append a new entry at the end of the <code><a href="#history-0">History</a></code>
        object representing the new resource and its
        <code>Document</code> object and related state.</li>
@@ -44630,6 +44592,9 @@
 
    </li>
 
+   <li><p>Remove any <a href="#concept-task" title="concept-task">tasks</a> queued by
+   the <a href="#history-traversal-task-source">history traversal task source</a>.</li>
+
    <li><p>Append a new entry at the end of the <code><a href="#history-0">History</a></code>
    object representing the new resource and its <code>Document</code>
    object and related state. Its <a href="#url">URL</a> must be set to the
@@ -44700,8 +44665,7 @@
   document</a>, if that is an element; otherwise there is no
   <i><a href="#target-element">target element</a></i>. <a href="#refsSELECTORS">[SELECTORS]</a></p>
 
-
-  <h4 id="history-traversal"><span class="secno">5.11.9 </span>History traversal</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p>
+  </div><h4 id="history-traversal"><span class="secno">5.11.9 </span>History traversal</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p><!-- session history --><div class="impl">
 
   <p>When a user agent is required to <dfn id="traverse-the-history">traverse the history</dfn>
   to a <i>specified entry</i>, optionally with <a href="#replacement-enabled">replacement
@@ -44719,8 +44683,6 @@
    created. (This can never happen with <a href="#replacement-enabled">replacement
    enabled</a>.)</li>
 
-   <li><p>Release the <a href="#storage-mutex">storage mutex</a>.</li>
-
    <li><p>If the <a href="#current-entry">current entry</a>'s title was not set by the
    <code title="dom-history-pushState"><a href="#dom-history-pushstate">pushState()</a></code> or <code title="dom-history-replaceState"><a href="#dom-history-replacestate">replaceState()</a></code> methods,
    then set its title to the value returned by the <code title="dom-document-title"><a href="#document.title">document.title</a></code> IDL
@@ -44801,7 +44763,10 @@
    <li><p>If the <i>specified entry</i> has a URL that differs from
    the <a href="#current-entry">current entry</a>'s only by its fragment identifier,
    and the two share the same <code>Document</code> object, then let
-   <var title="">hash changed</var> be true. Otherwise, let <var title="">hash changed</var> be false.</li>
+   <var title="">hash changed</var> be true, and let <var title="">old
+   URL</var> be the URL of the <a href="#current-entry">current entry</a> and <var title="">new URL</var> be the URL of the <i>specified
+   entry</i>. Otherwise, let <var title="">hash changed</var> be
+   false.</li>
 
    <li><p>If the traversal was initiated with <dfn id="replacement-enabled">replacement
    enabled</dfn>, remove the entry immediately before the
@@ -44816,20 +44781,129 @@
    view, for instance the scroll position or values of form fields,
    that it had previously recorded.</li>
 
-   <li><p>If the <i>specified entry</i> is a state object or the
-   first entry for a <code>Document</code>, the user agent must <a href="#activating-state-object-entries" title="activate the state object">activate that
-   entry</a>.</li>
+   <li>
 
-   <li><p>If <var title="">hash changed</var> is true, then
-   synchronously <a href="#fire-a-simple-event">fire a simple 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.</li>
+    <p>If the <i>specified entry</i> is a state object or the first
+    entry for a <code>Document</code>, the user agent must run the
+    following substeps:</p>
 
-   <li><p>Release the <a href="#storage-mutex">storage mutex</a> again.</li>
+    <ol><li><p>If the entry is a <a href="#state-object">state object</a> entry, let <var title="">state</var> be a <a href="#structured-clone">structured clone</a> of that
+     state object. Otherwise, let <var title="">state</var> be
+     null.</li>
+
+     <li>
+
+      <p>Run the appropriate steps according to the conditions
+      described:</p>
+
+      <dl class="switch"><dt>If the <a href="#current-document-readiness">current document readiness</a> is set to the
+       string "complete"</dt>
+
+       <dd><p><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
+       <code><a href="#window">Window</a></code> object of the <code>Document</code>, 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.</dd>
+
+       <dt>Otherwise</dt>
+
+       <dd><p>Let the <code>Document</code>'s <dfn id="pending-state-object">pending state
+       object</dfn> be <var title="">state</var>. (If there was already
+       a <a href="#pending-state-object">pending state object</a>, the previous one is
+       discarded.)</p>
+
+       <p class="note">The event will then be fired just after the <code title="event-load">load</code> event.</dd>
+
+      </dl></li>
+
+    </ol></li>
+
+   <li><p>If <var title="">hash changed</var> is true, then
+   <a href="#queue-a-task">queue a task</a> to fire a <code title="event-hashchange"><a href="#event-hashchange">hashchange</a></code> event at the
+   <a href="#browsing-context">browsing context</a>'s <code><a href="#window">Window</a></code> object, using
+   the <code><a href="#hashchangeevent">HashChangeEvent</a></code> interface, with the <code title="dom-HashChangeEvent-oldURL"><a href="#dom-hashchangeevent-oldurl">oldURL</a></code> attribute set to
+   <var title="">old URL</var> and the <code title="dom-HashChangeEvent-newURL"><a href="#dom-hashchangeevent-newurl">newURL</a></code> attribute set to
+   <var title="">new URL</var>. This event must bubble but not be
+   cancelable and has no default action.</li>
 
    <li><p>The <a href="#current-entry">current entry</a> is now the <i>specified
    entry</i>.</li>
 
-  </ol></div><h4 id="unloading-documents"><span class="secno">5.11.10 </span>Unloading documents</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><div class="impl">
+  </ol><p>The <a href="#pending-state-object">pending state object</a> must be initially null.</p>
+
+  <p>The <a href="#task-source">task source</a> for the tasks mentioned above is the
+  <a href="#dom-manipulation-task-source">DOM manipulation task source</a>.</p>
+
+
+  <h5 id="event-definitions"><span class="secno">5.11.9.1 </span>Event definitions</h5><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p>
+
+  </div><p>The <dfn id="event-popstate" title="event-popstate"><code>popstate</code></dfn> event
+  is fired when navigating to a <a href="#session-history-entry">session history entry</a>
+  that represents a state object.<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);
+};</pre><dl class="domintro"><dt><var title="">event</var> . <code title="dom-PopStateEvent-state"><a href="#dom-popstateevent-state">state</a></code></dt>
+
+   <dd>
+
+    <p>Returns the information that was provided to <code title="dom-history-pushState"><a href="#dom-history-pushstate">pushState()</a></code> or <code title="dom-history-replaceState"><a href="#dom-history-replacestate">replaceState()</a></code>.</p>
+
+   </dd>
+
+  </dl><div class="impl">
+
+  <p>The <dfn id="dom-popstateevent-initpopstateevent" title="dom-PopStateEvent-initPopStateEvent"><code>initPopStateEvent()</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-popstateevent-state" title="dom-PopStateEvent-state"><code>state</code></dfn>
+  attribute represents the context information for the event, or null,
+  if the state represented is the initial state of the
+  <code>Document</code>.</p>
+
+  </div><hr><p>The <dfn id="event-hashchange" title="event-hashchange"><code>hashchange</code></dfn>
+  event is fired when navigating to a <a href="#session-history-entry">session history
+  entry</a> whose <a href="#url">URL</a> differs from that of the
+  previous one only in the fragment identifier.<pre class="idl">interface <dfn id="hashchangeevent">HashChangeEvent</dfn> : Event {
+  readonly attribute any <a href="#dom-hashchangeevent-oldurl" title="dom-HashChangeEvent-oldURL">oldURL</a>;
+  readonly attribute any <a href="#dom-hashchangeevent-newurl" title="dom-HashChangeEvent-newURL">newURL</a>;
+  void <a href="#dom-hashchangeevent-inithashchangeevent" title="dom-HashChangeEvent-initHashChangeEvent">initHashChangeEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString oldURLArg, in DOMString newURLArg);
+};</pre><dl class="domintro"><dt><var title="">event</var> . <code title="dom-HashChangeEvent-oldURL"><a href="#dom-hashchangeevent-oldurl">oldURL</a></code></dt>
+
+   <dd>
+
+    <p>Returns the <a href="#url">URL</a> of the <a href="#session-history-entry">session history
+    entry</a> that was previously current.</p>
+
+   </dd>
+
+
+   <dt><var title="">event</var> . <code title="dom-HashChangeEvent-newURL"><a href="#dom-hashchangeevent-newurl">newURL</a></code></dt>
+
+   <dd>
+
+    <p>Returns the <a href="#url">URL</a> of the <a href="#session-history-entry">session history
+    entry</a> that is now current.</p>
+
+   </dd>
+
+  </dl><div class="impl">
+
+  <p>The <dfn id="dom-hashchangeevent-inithashchangeevent" title="dom-HashChangeEvent-initHashChangeEvent"><code>initHashChangeEvent()</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-hashchangeevent-oldurl" title="dom-HashChangeEvent-oldURL"><code>oldURL</code></dfn>
+  attribute represents context information for the event, specifically
+  the URL of the <a href="#session-history-entry">session history entry</a> that was traversed
+  from.</p>
+
+  <p>The <dfn id="dom-hashchangeevent-newurl" title="dom-HashChangeEvent-newURL"><code>newURL</code></dfn>
+  attribute represents context information for the event, specifically
+  the URL of the <a href="#session-history-entry">session history entry</a> that was traversed
+  to.</p>
+
+  </div><h4 id="unloading-documents"><span class="secno">5.11.10 </span>Unloading documents</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><div class="impl">
 
   <p>A <code>Document</code> has a <var title="">salvageable</var>
   state, which is initially true.</p>
@@ -44992,13 +45066,21 @@
   it must return the last value it was set to. On setting, the
   attribute must be set to the new value.</p>
 
-  </div><h4 id="aborting-a-document-load"><span class="secno">5.11.11 </span>Aborting a document load</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><p>If the user cancels any instance of the <a href="#fetch" title="fetch">fetching algorithm</a> in the context of a
+  </div><div class="impl">
+
+  <h4 id="aborting-a-document-load"><span class="secno">5.11.11 </span>Aborting a document load</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i></p>
+
+  <p>If the user cancels any instance of the <a href="#fetch" title="fetch">fetching algorithm</a> in the context of a
   <code>Document</code> in a <a href="#browsing-context">browsing context</a>, then, if
   that <code>Document</code> is an <a href="#active-document">active document</a>, the
   user agent must <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-abort">abort</code> at that
-  <code>Document</code>'s <code><a href="#window">Window</a></code> object.</p><!-- I'd love to make this more precise, anyone have any suggestions
-  on what it should say? --><h3 id="links"><span class="secno">5.12 </span>Links</h3><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><h4 id="hyperlink-elements"><span class="secno">5.12.1 </span>Hyperlink elements</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><p>The <code><a href="#the-a-element">a</a></code>, <code><a href="#the-area-element">area</a></code>, and <code><a href="#the-link-element">link</a></code>
+  <code>Document</code>'s <code><a href="#window">Window</a></code> object.</p>
+
+  <!-- I'd love to make this more precise, anyone have any suggestions
+  on what it should say? -->
+
+  </div><h3 id="links"><span class="secno">5.12 </span>Links</h3><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><h4 id="hyperlink-elements"><span class="secno">5.12.1 </span>Hyperlink elements</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><p>The <code><a href="#the-a-element">a</a></code>, <code><a href="#the-area-element">area</a></code>, and <code><a href="#the-link-element">link</a></code>
   elements can, in certain situations described in the definitions of
   those elements, represent <dfn id="hyperlink" title="hyperlink">hyperlinks</dfn>.<p>The <dfn id="attr-hyperlink-href" title="attr-hyperlink-href"><code>href</code></dfn>
   attribute on a hyperlink element must have a value that is a
@@ -66129,7 +66211,7 @@
 
     <tr><th> <code title="">onhashchange</code>
      <td> <code title="handler-window-onhashchange"><a href="#handler-window-onhashchange">body</a></code>
-     <td> <code title="event-hashchange">hashchange</code> event handler for <code><a href="#window">Window</a></code> object
+     <td> <code title="event-hashchange"><a href="#event-hashchange">hashchange</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="">oninput</code>
@@ -66714,8 +66796,8 @@
      <td> <code>Event</code>
      <td> Fired at form controls when the user changes the value of a control on the form
 
-    <tr><td> <code title="event-hashchange">hashchange</code>
-     <td> <code>Event</code>
+    <tr><td> <code title="event-hashchange"><a href="#event-hashchange">hashchange</a></code>
+     <td> <code><a href="#hashchangeevent">HashChangeEvent</a></code>
      <td> Fired at the <code><a href="#window">Window</a></code> when the fragment identifier part of <a href="#the-document-s-current-address">the document's current address</a> changes
 
     <tr><td> <code title="event-input">input</code>

Received on Friday, 29 January 2010 01:31:51 UTC