Skip to content

Commit b3c0fa9

Browse files
authored
Editorial: export storage key
And slightly modernize associated algorithms and annotate them as well.
1 parent 39f5138 commit b3c0fa9

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

storage.bs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,15 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
206206

207207
<h3 id=storage-keys>Storage keys</h3>
208208

209-
<p>A <dfn>storage key</dfn> is a <a>tuple</a> consisting of an <dfn for="storage key">origin</dfn>
210-
(an <a for=/>origin</a>). [[!HTML]]
209+
<p>A <dfn export>storage key</dfn> is a <a>tuple</a> consisting of an
210+
<dfn for="storage key">origin</dfn> (an <a for=/>origin</a>). [[!HTML]]
211211

212212
<p class=XXX>This is expected to change; see
213213
<a href="https://privacycg.github.io/storage-partitioning/">Client-Side Storage Partitioning</a>.
214214

215+
<div algorithm>
215216
<p>To <dfn export>obtain a storage key</dfn>, given an <a for=/>environment</a>
216-
<var>environment</var>, run these steps:
217+
<var>environment</var>:
217218

218219
<ol>
219220
<li><p>Let <var>key</var> be the result of running
@@ -226,9 +227,11 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
226227

227228
<li><p>Return <var>key</var>.
228229
</ol>
230+
</div>
229231

232+
<div algorithm>
230233
<p>To <dfn export>obtain a storage key for non-storage purposes</dfn>, given an
231-
<a for=/>environment</a> <var>environment</var>, run these steps:
234+
<a for=/>environment</a> <var>environment</var>:
232235

233236
<ol>
234237
<li><p>Let <var>origin</var> be <var>environment</var>'s
@@ -238,17 +241,19 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
238241

239242
<li><p>Return a <a>tuple</a> consisting of <var>origin</var>.
240243
</ol>
244+
</div>
241245

246+
<div algorithm>
242247
<p>To determine whether a <a>storage key</a> <var>A</var>
243-
<dfn export for="storage key" lt=equal>equals</dfn> <a>storage key</a> <var>B</var>, run these
244-
steps:
248+
<dfn export for="storage key" lt=equal>equals</dfn> <a>storage key</a> <var>B</var>:
245249

246250
<ol>
247251
<li><p>If <var>A</var>'s <a for="storage key">origin</a> is not <a>same origin</a> with
248252
<var>B</var>'s <a for="storage key">origin</a>, then return false.
249253

250254
<li><p>Return true.
251255
</ol>
256+
</div>
252257

253258

254259
<h3 id=storage-sheds>Storage sheds</h3>
@@ -472,7 +477,7 @@ is needed for <a href="https://github.com/whatwg/storage/issues/4">issue #4</a>
472477
<a href="https://privacycg.github.io/storage-access/">Storage Access API</a>.
473478

474479

475-
<h3 id=storage-task-source>Storage task source</h2>
480+
<h3 id=storage-task-source>Storage task source</h3>
476481

477482
<p>The <dfn export id=task-source>storage task source</dfn> is a <a for=/>task source</a> to be used
478483
for all <a for=/>tasks</a> related to a <a>storage endpoint</a>. In particular those that relate to

0 commit comments

Comments
 (0)