Skip to content

Commit 8d42260

Browse files
committed
Compute storage keys to be stored on environments. (whatwg#142)
1 parent afbf6bd commit 8d42260

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

storage.bs

+26
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
222222
<p>To <dfn export>obtain a storage key for non-storage purposes</dfn>, given an
223223
<a for=/>environment</a> <var>environment</var>, run these steps:
224224

225+
<p class=note>This algorithm will be removed or updated once the html spec is
226+
modified to store a storage key directly on environment.
227+
225228
<ol>
226229
<li><p>Let <var>origin</var> be <var>environment</var>'s
227230
<a for="environment settings object">origin</a> if <var>environment</var> is an
@@ -231,6 +234,29 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
231234
<li><p>Return a <a>tuple</a> consisting of <var>origin</var>.
232235
</ol>
233236

237+
<p>To <dfn export>compute a storage key for an environment settings object</dfn>,
238+
given an <a for=/>origin</a> <var>origin</var> and an optional
239+
<a for=/>storage key</a> <var>outer storage key</var>, run these steps:
240+
241+
<ol>
242+
<li>Return a <a>tuple</a> consisting of <var>origin</var>.
243+
</ol>
244+
245+
<p class=note>The <var>outer storage key</var> will be used in the future to
246+
compute and propagate additional values in the storage key in the future.
247+
For example, top-level site, the ancestor-chain bit, or anonymous iframe
248+
nonce.</p>
249+
250+
<p>To <dfn export>compute a storage key for an environment</dfn>, given a
251+
<a for=/>url</a> <var>creation url</var> and an optional <a for=/>storage key</a>
252+
<var>parent storage key</var>, run these steps:
253+
254+
<ol>
255+
<li>Let <var>origin</var> be <var>creation url</var>'s <a for=url>origin</a>.
256+
<li>Return the result of running <a for=/>compute a storage key for an environment
257+
settings object</a> given <var>origin</var> and <var>parent storage key</var>
258+
</ol>
259+
234260
<p>To determine whether a <a>storage key</a> <var>A</var>
235261
<dfn export for="storage key" lt=equal>equals</dfn> <a>storage key</a> <var>B</var>, run these
236262
steps:

0 commit comments

Comments
 (0)