Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute storage keys to be stored on environments. (#142) #143

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions storage.bs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
<p>To <dfn export>obtain a storage key for non-storage purposes</dfn>, given an
<a for=/>environment</a> <var>environment</var>, run these steps:

<p class=note>This algorithm will be removed or updated once the html spec is
modified to store a storage key directly on environment.

<ol>
<li><p>Let <var>origin</var> be <var>environment</var>'s
<a for="environment settings object">origin</a> if <var>environment</var> is an
Expand All @@ -231,6 +234,29 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
<li><p>Return a <a>tuple</a> consisting of <var>origin</var>.
</ol>

<p>To <dfn export>compute a storage key for an environment settings object</dfn>,
given an <a for=/>origin</a> <var>origin</var> and an optional
<a for=/>storage key</a> <var>parent-or-outer storage key</var>, run these steps:

<ol>
<li>Return a <a>tuple</a> consisting of <var>origin</var>.
</ol>

<p class=note>The <var>parent-or-outer storage key</var> will be used in the future to
compute and propagate additional values in the storage key in the future.
For example, top-level site, the ancestor-chain bit, or anonymous iframe
nonce.</p>

<p>To <dfn export>compute a storage key for an environment</dfn>, given a
<a for=/>url</a> <var>creation url</var> and an optional <a for=/>storage key</a>
<var>parent storage key</var>, run these steps:

<ol>
<li>Let <var>origin</var> be <var>creation url</var>'s <a for=url>origin</a>.
<li>Return the result of running <a for=/>compute a storage key for an environment
settings object</a> given <var>origin</var> and <var>parent storage key</var>
</ol>

<p>To determine whether a <a>storage key</a> <var>A</var>
<dfn export for="storage key" lt=equal>equals</dfn> <a>storage key</a> <var>B</var>, run these
steps:
Expand Down