html5/spec-author-view Overview.html,1.251,1.252 acknowledgements.html,1.251,1.252 browsers.html,1.252,1.253 comms.html,1.251,1.252 dom.html,1.252,1.253 editing.html,1.251,1.252 embedded-content-0.html,1.251,1.252 forms.html,1.251,1.252 history.html,1.252,1.253 iana-considerations.html,1.251,1.252 index.html,1.251,1.252 infrastructure.html,1.252,1.253 interactive-elements.html,1.251,1.252 introduction.html,1.252,1.253 microdata.html,1.251,1.252 named-character-references.html,1.252,1.253 obsolete.html,1.252,1.253 offline.html,1.251,1.252 references.html,1.251,1.252 semantics.html,1.251,1.252 spec.html,1.252,1.253 syntax.html,1.252,1.253 tabular-data.html,1.251,1.252 text-level-semantics.html,1.250,1.251 the-canvas-element.html,1.251,1.252 the-xhtml-syntax.html,1.250,1.251 video.html,1.251,1.252

Update of /sources/public/html5/spec-author-view
In directory hutz:/tmp/cvs-serv14695

Modified Files:
	Overview.html acknowledgements.html browsers.html comms.html 
	dom.html editing.html embedded-content-0.html forms.html 
	history.html iana-considerations.html index.html 
	infrastructure.html interactive-elements.html 
	introduction.html microdata.html 
	named-character-references.html obsolete.html offline.html 
	references.html semantics.html spec.html syntax.html 
	tabular-data.html text-level-semantics.html 
	the-canvas-element.html the-xhtml-syntax.html video.html 
Log Message:
Add an example for pushState(). (whatwg r4012)

[updated by splitter]


Index: infrastructure.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/infrastructure.html,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- infrastructure.html	28 Sep 2009 23:47:09 -0000	1.252
+++ infrastructure.html	29 Sep 2009 00:17:09 -0000	1.253
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="introduction.html">&#8592; 1 Introduction</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: text-level-semantics.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/text-level-semantics.html,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -d -r1.250 -r1.251
--- text-level-semantics.html	28 Sep 2009 23:47:10 -0000	1.250
+++ text-level-semantics.html	29 Sep 2009 00:17:10 -0000	1.251
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="semantics.html">&#8592; 4 The elements of HTML</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: history.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/history.html,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- history.html	28 Sep 2009 23:47:09 -0000	1.252
+++ history.html	29 Sep 2009 00:17:09 -0000	1.253
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="offline.html">&#8592; 6.7 Offline Web applications</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;
@@ -342,7 +342,71 @@
   subsequent entries are numbered with consecutively increasing
   integers (1, 2, 3, etc).</p><p>The <dfn id="current-entry-of-the-joint-session-history">current entry of the joint session history</dfn> is the
   entry that was the most recently became a <a href="#current-entry">current entry</a>
-  in its <a href="#session-history">session history</a>.</p><!-- XXX add a pushState() example here, for bug 7621 --><h4 id="activating-state-object-entries"><span class="secno">6.8.3 </span><dfn title="activate the state object">Activating state object entries</dfn></h4><pre class="idl">interface <dfn id="popstateevent">PopStateEvent</dfn> : Event {
+  in its <a href="#session-history">session history</a>.</p><div class="example">
+
+   <p>Consider a game where the user can navigate along a line, such
+   that the user is always at some coordinate, and such that the user
+   can bookmark the page corresponding to a particular coordinate, to
+   return to it later.</p>
+
+   <p>A static page implementing the x=5 position in such a game could
+   look like the following:</p>
+
+   <pre>&lt;!DOCTYPE HTML&gt;
+&lt;!-- this is http://example.com/line?x=5 --&gt;
+&lt;title&gt;Line Game - 5&lt;/title&gt;
+&lt;p&gt;You are at coordinate 5 on the line.&lt;/p&gt;
+&lt;p&gt;
+ &lt;a href="?x=6"&gt;Advance to 6&lt;/a&gt; or
+ &lt;a href="?x=4"&gt;retreat to 4&lt;/a&gt;?
+&lt;/p&gt;</pre>
+
+   <p>The problem with such a system is that each time the user
+   clicks, the whole page has to be reloaded. Here instead is another
+   way of doing it, using script:</p>
+
+   <pre>&lt;!DOCTYPE HTML&gt;
+&lt;!-- this starts off as http://example.com/line?x=5 --&gt;
+&lt;title&gt;Line Game - 5&lt;/title&gt;
+&lt;p&gt;You are at coordinate &lt;span id="coord"&gt;5&lt;/span&gt; on the line.&lt;/p&gt;
+&lt;p&gt;
+ &lt;a href="?x=6" onclick="go(1)"&gt;Advance to 6&lt;/a&gt; or
+ &lt;a href="?x=4" onclick="go(-1)"&gt;retreat to 4&lt;/a&gt;?
+&lt;/p&gt;
+&lt;script&gt;
+ var currentPage = 5; // prefilled by server
+ function go(d) {
+   history.pushState(currentPage, 'Line Game - ' + currentPage, '?x=' + currentPage);
+   setupPage(currentPage + d);
+ }
+ onpopstate = function(event) {
+   setupPage(event.state);
+ }
+ function setupPage(page) {
+   currentPage = page;
+   document.title = 'Line Game - ' + currentPage;
+   document.getElementById('coord').textContent = currentPage;
+   document.links[0].href = '?x=' + (currentPage+1);
+   document.links[0].textContent = 'Advance to ' + (currentPage+1);
+   document.links[1].href = '?x=' + (currentPage-1);
+   document.links[1].textContent = 'retreat to ' + (currentPage-1);
+ }
+&lt;/script&gt;</pre>
+
+   <p>In systems without script, this still works like the previous
+   example. However, users that <em>do</em> have script support can
+   now navigate much faster, since there is no network access for the
+   same experience. Furthermore, contrary to the experience the user
+   would have with just a na&#239;ve script-based approach,
+   bookmarking and navigating the session history still work.</p>
+
+   <p>In the example above, the <var title="">data</var> argument to
+   the <code title="dom-history-pushState"><a href="#dom-history-pushstate">pushState()</a></code> method
+   is the same information as would be sent to the server, but in a
+   more convenient form, so that the script doesn't have to parse the
+   URL each time the user navigates.</p>
+
+  </div><h4 id="activating-state-object-entries"><span class="secno">6.8.3 </span><dfn title="activate the state object">Activating state object entries</dfn></h4><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);

Index: tabular-data.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/tabular-data.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- tabular-data.html	28 Sep 2009 23:47:10 -0000	1.251
+++ tabular-data.html	29 Sep 2009 00:17:09 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="the-canvas-element.html">&#8592; 4.8.11 The canvas element</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: microdata.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/microdata.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- microdata.html	28 Sep 2009 23:47:09 -0000	1.251
+++ microdata.html	29 Sep 2009 00:17:09 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="interactive-elements.html">&#8592; 4.11 Interactive elements</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/Overview.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- Overview.html	28 Sep 2009 23:47:09 -0000	1.251
+++ Overview.html	29 Sep 2009 00:17:08 -0000	1.252
@@ -217,7 +217,7 @@
    <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>
    <!--ZZZ:-->
    <!--<h2 class="no-num no-toc">W3C Working Draft 25 August 2009</h2>-->
-   <h2 class="no-num no-toc" id="editor-s-draft-28-september-2009">Editor's Draft 28 September 2009</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-29-september-2009">Editor's Draft 29 September 2009</h2>
    <!--:ZZZ-->
    <dl><!-- ZZZ: update the month/day (twice), (un)comment out--><!--
     <dt>This Version:</dt>
@@ -240,7 +240,7 @@
    </dl><p>This specification is available in the following formats: 
     <a href="spec.html">single page HTML</a>,
     <a href="Overview.html">multipage HTML</a>.
-This is revision 1.3173.
+This is revision 1.3174.
    </p>
    <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
    &#169; 2009 <a href="http://www.w3.org/"><abbr title="World Wide
@@ -319,7 +319,7 @@
   track.
   <!--ZZZ:-->
   <!--This specification is the 25 August 2009 Working Draft.-->
-  This specification is the 28 September 2009 Editor's Draft.
+  This specification is the 29 September 2009 Editor's Draft.
   <!--:ZZZ-->
   </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 also being produced by the <a href="http://www.whatwg.org/">WHATWG</a>. The two specifications are
   identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of)

Index: embedded-content-0.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/embedded-content-0.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- embedded-content-0.html	28 Sep 2009 23:47:09 -0000	1.251
+++ embedded-content-0.html	29 Sep 2009 00:17:09 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="dom.html">&#8592; 3 Semantics, structure, and APIs of HTML documents</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: dom.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/dom.html,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- dom.html	28 Sep 2009 23:47:09 -0000	1.252
+++ dom.html	29 Sep 2009 00:17:08 -0000	1.253
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="infrastructure.html">&#8592; 2 Common infrastructure</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: acknowledgements.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/acknowledgements.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- acknowledgements.html	28 Sep 2009 23:47:09 -0000	1.251
+++ acknowledgements.html	29 Sep 2009 00:17:08 -0000	1.252
@@ -217,7 +217,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="references.html">&#8592; References</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a>

Index: the-canvas-element.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/the-canvas-element.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- the-canvas-element.html	28 Sep 2009 23:47:10 -0000	1.251
+++ the-canvas-element.html	29 Sep 2009 00:17:10 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="video.html">&#8592; 4.8.7 The video element</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: iana-considerations.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/iana-considerations.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- iana-considerations.html	28 Sep 2009 23:47:09 -0000	1.251
+++ iana-considerations.html	29 Sep 2009 00:17:09 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="obsolete.html">&#8592; 11 Obsolete features</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: forms.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/forms.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- forms.html	28 Sep 2009 23:47:09 -0000	1.251
+++ forms.html	29 Sep 2009 00:17:09 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="tabular-data.html">&#8592; 4.9 Tabular data</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: interactive-elements.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/interactive-elements.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- interactive-elements.html	28 Sep 2009 23:47:09 -0000	1.251
+++ interactive-elements.html	29 Sep 2009 00:17:09 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="forms.html">&#8592; 4.10 Forms</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: editing.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/editing.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- editing.html	28 Sep 2009 23:47:09 -0000	1.251
+++ editing.html	29 Sep 2009 00:17:08 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="history.html">&#8592; 6.8 Session history and navigation</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: video.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/video.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- video.html	28 Sep 2009 23:47:11 -0000	1.251
+++ video.html	29 Sep 2009 00:17:10 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="text-level-semantics.html">&#8592; 4.6 Text-level semantics</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: browsers.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/browsers.html,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- browsers.html	28 Sep 2009 23:47:09 -0000	1.252
+++ browsers.html	29 Sep 2009 00:17:08 -0000	1.253
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="microdata.html">&#8592; 5 Microdata</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: the-xhtml-syntax.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/the-xhtml-syntax.html,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -d -r1.250 -r1.251
--- the-xhtml-syntax.html	28 Sep 2009 23:47:10 -0000	1.250
+++ the-xhtml-syntax.html	29 Sep 2009 00:17:10 -0000	1.251
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="named-character-references.html">&#8592; 9.2 Named character references</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: offline.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/offline.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- offline.html	28 Sep 2009 23:47:09 -0000	1.251
+++ offline.html	29 Sep 2009 00:17:09 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="browsers.html">&#8592; 6 Web browsers</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: syntax.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/syntax.html,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- syntax.html	28 Sep 2009 23:47:10 -0000	1.252
+++ syntax.html	29 Sep 2009 00:17:09 -0000	1.253
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="comms.html">&#8592; 8 Communication</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: obsolete.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/obsolete.html,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- obsolete.html	28 Sep 2009 23:47:09 -0000	1.252
+++ obsolete.html	29 Sep 2009 00:17:09 -0000	1.253
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="the-xhtml-syntax.html">&#8592; 10 The XHTML syntax</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: named-character-references.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/named-character-references.html,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- named-character-references.html	28 Sep 2009 23:47:09 -0000	1.252
+++ named-character-references.html	29 Sep 2009 00:17:09 -0000	1.253
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="syntax.html">&#8592; 9 The HTML syntax</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: references.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/references.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- references.html	28 Sep 2009 23:47:10 -0000	1.251
+++ references.html	29 Sep 2009 00:17:09 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="index.html">&#8592; Index</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: semantics.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/semantics.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- semantics.html	28 Sep 2009 23:47:10 -0000	1.251
+++ semantics.html	29 Sep 2009 00:17:09 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="embedded-content-0.html">&#8592; 3.2.5.1.6 Embedded content</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: index.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/index.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- index.html	28 Sep 2009 23:47:09 -0000	1.251
+++ index.html	29 Sep 2009 00:17:09 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="iana-considerations.html">&#8592; IANA considerations</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: comms.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/comms.html,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- comms.html	28 Sep 2009 23:47:09 -0000	1.251
+++ comms.html	29 Sep 2009 00:17:08 -0000	1.252
@@ -218,7 +218,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="editing.html">&#8592; 7 User Interaction</a> &#8211;
    <a href="Overview.html#contents">Table of contents</a> &#8211;

Index: spec.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/spec.html,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- spec.html	28 Sep 2009 23:47:10 -0000	1.252
+++ spec.html	29 Sep 2009 00:17:09 -0000	1.253
@@ -215,7 +215,7 @@
    <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>
    <!--ZZZ:-->
    <!--<h2 class="no-num no-toc">W3C Working Draft 25 August 2009</h2>-->
-   <h2 class="no-num no-toc" id=editor-s-draft-28-september-2009>Editor's Draft 28 September 2009</h2>
+   <h2 class="no-num no-toc" id=editor-s-draft-29-september-2009>Editor's Draft 29 September 2009</h2>
    <!--:ZZZ-->
    <dl><!-- ZZZ: update the month/day (twice), (un)comment out--><!--
     <dt>This Version:</dt>
@@ -238,7 +238,7 @@
    </dl><p>This specification is available in the following formats: 
     <a href=spec.html>single page HTML</a>,
     <a href=Overview.html>multipage HTML</a>.
-This is revision 1.3173.
+This is revision 1.3174.
    </p>
    <p class=copyright><a href=http://www.w3.org/Consortium/Legal/ipr-notice#Copyright>Copyright</a>
    © 2009 <a href=http://www.w3.org/><abbr title="World Wide
@@ -317,7 +317,7 @@
   track.
   <!--ZZZ:-->
   <!--This specification is the 25 August 2009 Working Draft.-->
-  This specification is the 28 September 2009 Editor's Draft.
+  This specification is the 29 September 2009 Editor's Draft.
   <!--:ZZZ-->
   </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 also being produced by the <a href=http://www.whatwg.org/>WHATWG</a>. The two specifications are
   identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of)
@@ -23589,7 +23589,71 @@
   subsequent entries are numbered with consecutively increasing
   integers (1, 2, 3, etc).</p><p>The <dfn id=current-entry-of-the-joint-session-history>current entry of the joint session history</dfn> is the
   entry that was the most recently became a <a href=#current-entry>current entry</a>
-  in its <a href=#session-history>session history</a>.</p><!-- XXX add a pushState() example here, for bug 7621 --><h4 id=activating-state-object-entries><span class=secno>6.8.3 </span><dfn title="activate the state object">Activating state object entries</dfn></h4><pre class=idl>interface <dfn id=popstateevent>PopStateEvent</dfn> : Event {
+  in its <a href=#session-history>session history</a>.</p><div class=example>
+
+   <p>Consider a game where the user can navigate along a line, such
+   that the user is always at some coordinate, and such that the user
+   can bookmark the page corresponding to a particular coordinate, to
+   return to it later.</p>
+
+   <p>A static page implementing the x=5 position in such a game could
+   look like the following:</p>
+
+   <pre>&lt;!DOCTYPE HTML&gt;
+&lt;!-- this is http://example.com/line?x=5 --&gt;
+&lt;title&gt;Line Game - 5&lt;/title&gt;
+&lt;p&gt;You are at coordinate 5 on the line.&lt;/p&gt;
+&lt;p&gt;
+ &lt;a href="?x=6"&gt;Advance to 6&lt;/a&gt; or
+ &lt;a href="?x=4"&gt;retreat to 4&lt;/a&gt;?
+&lt;/p&gt;</pre>
+
+   <p>The problem with such a system is that each time the user
+   clicks, the whole page has to be reloaded. Here instead is another
+   way of doing it, using script:</p>
+
+   <pre>&lt;!DOCTYPE HTML&gt;
+&lt;!-- this starts off as http://example.com/line?x=5 --&gt;
+&lt;title&gt;Line Game - 5&lt;/title&gt;
+&lt;p&gt;You are at coordinate &lt;span id="coord"&gt;5&lt;/span&gt; on the line.&lt;/p&gt;
+&lt;p&gt;
+ &lt;a href="?x=6" onclick="go(1)"&gt;Advance to 6&lt;/a&gt; or
+ &lt;a href="?x=4" onclick="go(-1)"&gt;retreat to 4&lt;/a&gt;?
+&lt;/p&gt;
+&lt;script&gt;
+ var currentPage = 5; // prefilled by server
+ function go(d) {
+   history.pushState(currentPage, 'Line Game - ' + currentPage, '?x=' + currentPage);
+   setupPage(currentPage + d);
+ }
+ onpopstate = function(event) {
+   setupPage(event.state);
+ }
+ function setupPage(page) {
+   currentPage = page;
+   document.title = 'Line Game - ' + currentPage;
+   document.getElementById('coord').textContent = currentPage;
+   document.links[0].href = '?x=' + (currentPage+1);
+   document.links[0].textContent = 'Advance to ' + (currentPage+1);
+   document.links[1].href = '?x=' + (currentPage-1);
+   document.links[1].textContent = 'retreat to ' + (currentPage-1);
+ }
+&lt;/script&gt;</pre>
+
+   <p>In systems without script, this still works like the previous
+   example. However, users that <em>do</em> have script support can
+   now navigate much faster, since there is no network access for the
+   same experience. Furthermore, contrary to the experience the user
+   would have with just a naïve script-based approach,
+   bookmarking and navigating the session history still work.</p>
+
+   <p>In the example above, the <var title="">data</var> argument to
+   the <code title=dom-history-pushState><a href=#dom-history-pushstate>pushState()</a></code> method
+   is the same information as would be sent to the server, but in a
+   more convenient form, so that the script doesn't have to parse the
+   URL each time the user navigates.</p>
+
+  </div><h4 id=activating-state-object-entries><span class=secno>6.8.3 </span><dfn title="activate the state object">Activating state object entries</dfn></h4><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);

Index: introduction.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/introduction.html,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- introduction.html	28 Sep 2009 23:47:09 -0000	1.252
+++ introduction.html	29 Sep 2009 00:17:09 -0000	1.253
@@ -217,7 +217,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <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>
-<p>This is revision 1.3173.</p>
+<p>This is revision 1.3174.</p>
    </div><div>
    <a href="Overview.html#contents">Table of contents</a> &#8211;
    <a href="infrastructure.html">2 Common infrastructure &#8594;</a>

Received on Tuesday, 29 September 2009 00:17:43 UTC