hixie: Add some exposition about state objects. (whatwg r4989)

hixie: Add some exposition about state objects. (whatwg r4989)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.4006&r2=1.4007&f=h
http://html5.org/tools/web-apps-tracker?from=4988&to=4989

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4006
retrieving revision 1.4007
diff -u -d -r1.4006 -r1.4007
--- Overview.html 8 Apr 2010 23:49:12 -0000 1.4006
+++ Overview.html 9 Apr 2010 01:52:21 -0000 1.4007
@@ -285,7 +285,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-8-april-2010">Editor's Draft 8 April 2010</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-9-april-2010">Editor's Draft 9 April 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>
@@ -392,7 +392,7 @@
   specification's progress along the W3C Recommendation
   track.
 
-  This specification is the 8 April 2010 Editor's Draft.
+  This specification is the 9 April 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>The contents of this specification are also part of <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">a
   specification</a> published by the <a href="http://www.whatwg.org/">WHATWG</a>, which is available under a
   license that permits reuse of the specification text.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- required patent boilerplate --><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
@@ -42029,7 +42029,28 @@
   interface state.<p>Pages can <a href="#dom-history-pushstate" title="dom-history-pushState">add</a> <a href="#state-object" title="state object">state objects</a> between their entry in the
   session history and the next ("forward") entry. These are then <a href="#event-popstate" title="event-popstate">returned to the script</a> when the user
   (or script) goes back in the history, thus enabling authors to use
-  the "navigation" metaphor even in one-page applications.<p>At any point, one of the entries in the session history is the
+  the "navigation" metaphor even in one-page applications.<div class="note">
+
+   <p><a href="#state-object" title="state object">State objects</a> are intended to
+   be used for two main purposes: first, storing a preparsed
+   description of the state in the <a href="#url">URL</a> so that in the
+   simple case an author doesn't have to do the parsing (though one
+   would still need the parsing for handling <a href="#url" title="URL">URLs</a> passed around by users, so it's only a minor
+   optimization), and second, so that the author can store state that
+   one wouldn't store in the URL because it only applies to the current
+   <code><a href="#document">Document</a></code> instance and it would have to be reconstructed
+   if a new <code><a href="#document">Document</a></code> were opened.</p>
+
+   <p>An example of the latter would be something like keeping track of
+   the precise coordinate from which a popup <code><a href="#the-div-element">div</a></code> was made
+   to animate, so that if the user goes back, it can be made to animate
+   to the same location. Or alternatively, it could be used to keep a
+   pointer into a cache of data that would be fetched from the server
+   based on the information in the <a href="#url">URL</a>, so that when going
+   back and forward, the information doesn't have to be fetched
+   again.</p>
+
+  </div><hr><p>At any point, one of the entries in the session history is the
   <dfn id="current-entry">current entry</dfn>. This is the entry representing the
   <a href="#active-document">active document</a> of the <a href="#browsing-context">browsing
   context</a>. The <a href="#current-entry">current entry</a> is usually an entry

Received on Friday, 9 April 2010 01:53:07 UTC