Skip to content

Commit

Permalink
Add top-level site to storage key. (whatwg#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanderview committed Jun 2, 2022
1 parent afbf6bd commit 8ec1c23
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions storage.bs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
<h3 id=storage-keys>Storage keys</h3>

<p>A <dfn>storage key</dfn> is a <a>tuple</a> consisting of an <dfn for="storage key">origin</dfn>
(an <a for=/>origin</a>). [[!HTML]]
(an <a for=/>origin</a>) and a <dfn for="storage key">top-level site</dfn> (a <a for=/>site</a>). [[!HTML]]

<p class=XXX>This is expected to change; see
<a href="https://privacycg.github.io/storage-partitioning/">Client-Side Storage Partitioning</a>.
Expand Down Expand Up @@ -228,7 +228,15 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
<a>environment settings object</a>; otherwise <var>environment</var>'s
<a for=environment>creation URL</a>'s <a for=url>origin</a>.

<li><p>Return a <a>tuple</a> consisting of <var>origin</var>.
<li><p>Let <var>top-level origin</var> be <var>environment</var>'s
<a for=environment>top-level origin</a>.

<li><p>If <var>top-level origin</var> is null, then set it to <var>origin</var>.

<li><p>Let <var>top-level site</var> be the result of of running <a>obtain a site</a>
given <var>top-level origin</var>.

<li><p>Return a <a>tuple</a> consisting of <var>origin</var> and <var>top-level site</var>.
</ol>

<p>To determine whether a <a>storage key</a> <var>A</var>
Expand All @@ -239,6 +247,9 @@ steps:
<li><p>If <var>A</var>'s <a for="storage key">origin</a> is not <a>same origin</a> with
<var>B</var>'s <a for="storage key">origin</a>, then return false.

<li><p>If <var>A</var>'s <a for="storage key">top-level site</a> is not equal to
<var>B</var>'s <a for="storage key">top-level site</a>, then return false.

<li><p>Return true.
</ol>

Expand Down

0 comments on commit 8ec1c23

Please sign in to comment.