Skip to content

Commit

Permalink
add cloning here instead
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed May 20, 2020
1 parent 7e41693 commit 8561fc5
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions storage.bs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,28 @@ It is initially empty.
browsing session. It is roughly analogous to <a>top-level browsing context</a> except that it cannot
be replaced due to <code>Cross-Origin-Opener-Policy</code> or navigation.

<p>To <dfn export>legacy-clone a browsing session storage shed</dfn>, given a browsing session
<var>A</var> and a browsing session <var>B</var>, run these steps:

<ol>
<li>
<p><a for=map>For each</a> <var>key</var><var>shelf</var> of <var>A</var>'s
<a for="browsing session">storage shed</a>:

<ol>
<li><p>Let <var>newShelf</var> be the result of running <a>create a storage shelf</a> with
"<code>session</code>".

<li><p>Set <var>newShelf</var>'s <a>bucket map</a>["<code>default</code>"]'s
<a>bottle map</a>["<code>sessionStorage</code>"]'s <a for="storage bottle">map</a> to a
<a for=map>clone</a> of <var>shelf</var>'s <a>bucket map</a>["<code>default</code>"]'s
<a>bottle map</a>["<code>sessionStorage</code>"]'s <a for="storage bottle">map</a>.

<li><p>Set <var>B</var>'s <a for="browsing session">storage shed</a>[<var>key</var>] to
<var>newShelf</var>.
</ol>
</ol>


<h3 id=storage-shelves>Storage shelves</h3>

Expand Down Expand Up @@ -261,8 +283,8 @@ given a <a for=map>value</a> when a <a>storage shelf</a> is
<var>environment</var>, return the result of running <a>obtain a storage shelf</a> with the user
agent's <a for="user agent">storage shed</a>, <var>environment</var>, and "<code>local</code>".

<p>To <dfn export>create a storage shelf</dfn>, given a <a>storage type</a> <var>type</var>, run
these steps:
<p>To <dfn>create a storage shelf</dfn>, given a <a>storage type</a> <var>type</var>, run these
steps:

<ol>
<li><p>Let <var>shelf</var> be a new <a>storage shelf</a>.
Expand Down

0 comments on commit 8561fc5

Please sign in to comment.