[html5] r2575 - [giw] (2) Make it clear that sessionStorage and localStorage return the same obj [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Dec 24 04:29:35 PST 2008


Author: ianh
Date: 2008-12-24 04:29:35 -0800 (Wed, 24 Dec 2008)
New Revision: 2575

Modified:
   index
   source
Log:
[giw] (2) Make it clear that sessionStorage and localStorage return the same object each time, but a unique object per Document. (credit: pt)

Modified: index
===================================================================
--- index	2008-12-24 12:22:53 UTC (rev 2574)
+++ index	2008-12-24 12:29:35 UTC (rev 2575)
@@ -38684,10 +38684,10 @@
   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>
 
-  <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>
+  <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>
 
   <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
@@ -38732,15 +38732,16 @@
 
   <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>
+  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>
 
-  <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>
+  <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>
 
   <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

Modified: source
===================================================================
--- source	2008-12-24 12:22:53 UTC (rev 2574)
+++ source	2008-12-24 12:29:35 UTC (rev 2575)
@@ -44049,11 +44049,11 @@
   document's <span>origin</span>. If it has not, a new storage area
   for that document's <span>origin</span> must be created.</p>
 
-  <p>The <code>Storage</code> object for the document's associated
-  <code>Window</code> object's <code
-  title="dom-sessionStorage">sessionStorage</code> attribute must then
-  be associated with that <span>origin</span>'s session storage area
-  for that <span>top-level browsing context</span>.</p>
+  <p>The <code title="dom-sessionStorage">sessionStorage</code>
+  attribute must return the <code>Storage</code> object associated
+  with that session storage area. Each <code>Document</code> object
+  must have a separate object for its <code>Window</code>'s <code
+  title="dom-sessionStorage">sessionStorage</code> attribute.</p>
 
   <p>When a new <span>top-level browsing context</span> is created by
   cloning an existing <span>browsing context</span>, the new browsing
@@ -44104,15 +44104,17 @@
 
   <p>When the <code title="dom-localStorage">localStorage</code>
   attribute is accessed, the user agent must check to see if it has
-  allocated local storage area for the for the <span>origin</span> of
-  the <span>active document</span> of the <span>browsing
-  context</span> of the <code>Window</code> object on which the method
-  was invoked. If it has not, a new storage area for that
-  <span>origin</span> must be created.</p>
+  allocated a local storage area for the <span>origin</span> of the
+  <span>active document</span> of the <span>browsing context</span> of
+  the <code>Window</code> object on which the method was invoked. If
+  it has not, a new storage area for that <span>origin</span> must be
+  created.</p>
 
-  <p>The user agent must then create a <code>Storage</code> object
-  associated with that origin's local storage area, and return
-  it.</p>
+  <p>The user agent must then return the <code>Storage</code> object
+  associated with that origin's local storage area. Each
+  <code>Document</code> object must have a separate object for its
+  <code>Window</code>'s <code
+  title="dom-localStorage">localStorage</code> attribute.</p>
 
   <p id="localStorageEvent">When the <code
   title="dom-Storage-setItem">setItem()</code>, <code




More information about the Commit-Watchers mailing list