Skip to content

Commit 8ec1c23

Browse files
committed
Add top-level site to storage key. (#127)
1 parent afbf6bd commit 8ec1c23

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

storage.bs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
199199
<h3 id=storage-keys>Storage keys</h3>
200200

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

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

231-
<li><p>Return a <a>tuple</a> consisting of <var>origin</var>.
231+
<li><p>Let <var>top-level origin</var> be <var>environment</var>'s
232+
<a for=environment>top-level origin</a>.
233+
234+
<li><p>If <var>top-level origin</var> is null, then set it to <var>origin</var>.
235+
236+
<li><p>Let <var>top-level site</var> be the result of of running <a>obtain a site</a>
237+
given <var>top-level origin</var>.
238+
239+
<li><p>Return a <a>tuple</a> consisting of <var>origin</var> and <var>top-level site</var>.
232240
</ol>
233241

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

250+
<li><p>If <var>A</var>'s <a for="storage key">top-level site</a> is not equal to
251+
<var>B</var>'s <a for="storage key">top-level site</a>, then return false.
252+
242253
<li><p>Return true.
243254
</ol>
244255

0 commit comments

Comments
 (0)