Skip to content

Commit

Permalink
[giw] (2) Make it clear that sessionStorage and localStorage return t…
Browse files Browse the repository at this point in the history
…he same object each time, but a unique object per Document. (credit: pt)

git-svn-id: http://svn.whatwg.org/webapps@2575 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 24, 2008
1 parent 96eeab3 commit 9faf431
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 27 deletions.
27 changes: 14 additions & 13 deletions index
Expand Up @@ -38684,10 +38684,10 @@ user reload must be equivalent to .reload()
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
Expand Down Expand Up @@ -38732,15 +38732,16 @@ user reload must be equivalent to .reload()

<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>

<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>
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 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
Expand Down
30 changes: 16 additions & 14 deletions source
Expand Up @@ -44049,11 +44049,11 @@ user reload must be equivalent to .reload()
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
Expand Down Expand Up @@ -44104,15 +44104,17 @@ user reload must be equivalent to .reload()

<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>

<p>The user agent must then create a <code>Storage</code> object
associated with that origin's local storage area, and return
it.</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 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
Expand Down

0 comments on commit 9faf431

Please sign in to comment.