spec/Overview.html 1.1746 2575 Make it clear that sessionStorage and lo

Make it clear that sessionStorage and localStorage return the same
object each time, but a unique object per Document. (credit: pt) (whatwg
r2575)

When the setItem(), removeItem(), and clear() methods are called on a Storage object x that is associated with a local storage area, then in every HTMLDocument object whose Window object's localStorage attribute's Storage object is associated with the same storage area, other than x, a storage event must be fired, as described below.
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1746.html#localStorageEvent
5.10.1.3 The sessionStorage attribute
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1746.html#the-sessionstorage-attribute
5.10.1.4 The localStorage attribute
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1746.html#the-localstorage-attribute

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1745&r2=1.1746&f=h
http://html5.org/tools/web-apps-tracker?from=2574&to=2575

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1745
retrieving revision 1.1746
diff -u -d -r1.1745 -r1.1746
--- Overview.html 24 Dec 2008 12:22:59 -0000 1.1745
+++ Overview.html 24 Dec 2008 12:29:40 -0000 1.1746
@@ -31455,10 +31455,10 @@
   must check to see if the document's <a href=#top-level-browsing-context>top-level browsing
   context</a> has allocated a session storage area for that
   document's <a href=#origin-0>origin</a>. If it has not, a new storage area
-  for that document's <a href=#origin-0>origin</a> must be created.<p>The <code><a href=#storage-0>Storage</a></code> object for the document's associated
-  <code><a href=#window>Window</a></code> object's <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code> attribute must then
-  be associated with that <a href=#origin-0>origin</a>'s session storage area
-  for that <a href=#top-level-browsing-context>top-level browsing context</a>.<p>When a new <a href=#top-level-browsing-context>top-level browsing context</a> is created by
+  for that document's <a href=#origin-0>origin</a> must be created.<p>The <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code>
+  attribute must return the <code><a href=#storage-0>Storage</a></code> object associated
+  with that session storage area. Each <code>Document</code> object
+  must have a separate object for its <code><a href=#window>Window</a></code>'s <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code> attribute.<p>When a new <a href=#top-level-browsing-context>top-level browsing context</a> is created by
   cloning an existing <a href=#browsing-context>browsing context</a>, the new browsing
   context must start with the same session storage areas as the
   original, but the two sets must from that point on be considered
@@ -31486,13 +31486,14 @@
   Web applications will use the local storage areas for storing
   user-written documents.<p>When the <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code>
   attribute is accessed, the user agent must check to see if it has
-  allocated local storage area for the for the <a href=#origin-0>origin</a> of
-  the <a href=#active-document>active document</a> of the <a href=#browsing-context>browsing
-  context</a> of the <code><a href=#window>Window</a></code> object on which the method
-  was invoked. If it has not, a new storage area for that
-  <a href=#origin-0>origin</a> must be created.<p>The user agent must then create a <code><a href=#storage-0>Storage</a></code> object
-  associated with that origin's local storage area, and return
-  it.<p id=localStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a
+  allocated a local storage area for the <a href=#origin-0>origin</a> of the
+  <a href=#active-document>active document</a> of the <a href=#browsing-context>browsing context</a> of
+  the <code><a href=#window>Window</a></code> object on which the method was invoked. If
+  it has not, a new storage area for that <a href=#origin-0>origin</a> must be
+  created.<p>The user agent must then return the <code><a href=#storage-0>Storage</a></code> object
+  associated with that origin's local storage area. Each
+  <code>Document</code> object must have a separate object for its
+  <code><a href=#window>Window</a></code>'s <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute.<p id=localStorageEvent>When the <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code>, <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code>, and <code title=dom-Storage-clear><a href=#dom-storage-clear>clear()</a></code> methods are called on a
   <code><a href=#storage-0>Storage</a></code> object <var title="">x</var> that is associated
   with a local storage area, then in every <code><a href=#htmldocument>HTMLDocument</a></code>
   object whose <code><a href=#window>Window</a></code> object's <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute's

Received on Wednesday, 24 December 2008 12:33:06 UTC