Skip to content

Commit f2b0ddf

Browse files
committed
Updates for latest permission spec
1 parent 0128bca commit f2b0ddf

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

storage-access.bs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ spec:webidl; type:dfn; text:resolve
2727
<pre class="anchors">
2828
urlPrefix: https://tc39.github.io/ecma262/; spec: ECMASCRIPT
2929
text: agent cluster; url: #sec-agent-clusters; type: dfn
30-
urlPrefix: https://infra.spec.whatwg.org/; spec: INFRA
31-
text: implementation-defined; url: #implementation-defined; type: dfn
30+
urlPrefix: https://w3c.github.io/permissions/; spec: permissions
31+
text: permissions task source; url: #permissions-task-source; type: dfn
3232
urlPrefix: https://w3c.github.io/webdriver/webdriver-spec.html#; spec: webdriver
3333
type: dfn
3434
text: current browsing context; url: dfn-current-browsing-context
@@ -206,7 +206,7 @@ When invoked on {{Document}} |doc|, the <dfn export method for=Document><code>re
206206
1. Otherwise, run these steps [=in parallel=]:
207207
1. Let |hasAccess| be [=a new promise=].
208208
1. [=Determine the storage access policy=] with |key|, |doc| and |hasAccess|.
209-
1. [=Queue a global task=] on the [=permission task source=] given |global| to
209+
1. [=Queue a global task=] on the [=permissions task source=] given |global| to
210210
1. Set |flag set|'s [=has storage access flag=].
211211
1. Resolve or reject |p| based on the result of |hasAccess|.
212212
1. Return |p|.
@@ -230,13 +230,13 @@ To <dfn type="abstract-op">determine the storage access policy</dfn> for [=parti
230230
1. Let |flag set| be the result of [=obtain a storage access flag set|obtaining the storage access flag set=] with |key| from |map|.
231231
1. Let |implicitly granted| and |implicitly denied| (each a [=boolean=]) be the result of running an [=implementation-defined=] set of steps to determine if |key|'s [=partitioned storage key/embedded origin=]'s request for storage access on |key|'s [=partitioned storage key/top-level site=] should be granted or denied without prompting the user.
232232
1. Let |global| be |doc|'s [=relevant global object=].
233-
1. If |implicitly granted| is true, [=queue a global task=] on the [=permission task source=] given |global| to [=/resolve=] |p|, and return.
234-
1. If |implicitly denied| is true, [=queue a global task=] on the [=permission task source=] given |global| to [=/reject=] |p| with a "{{NotAllowedError}}" {{DOMException}}, and return |p|.
233+
1. If |implicitly granted| is true, [=queue a global task=] on the [=permissions task source=] given |global| to [=/resolve=] |p|, and return.
234+
1. If |implicitly denied| is true, [=queue a global task=] on the [=permissions task source=] given |global| to [=/reject=] |p| with a "{{NotAllowedError}}" {{DOMException}}, and return |p|.
235235
1. Let |permissionState| be the result of [=requesting permission to use=] "<a permission><code>storage-access</code></a>".
236-
1. If |permissionState| is "granted", [=queue a global task=] on the [=permission task source=] given |global| to [=/resolve=] |p|, and return.
236+
1. If |permissionState| is "granted", [=queue a global task=] on the [=permissions task source=] given |global| to [=/resolve=] |p|, and return.
237237
1. Unset |flag set|'s [=has storage access flag=].
238238
1. If |doc|'s {{Window}} object has [=transient activation=], [=consume user activation=] with it.
239-
1. [=Queue a global task=] on the [=permission task source=] given |global| to [=/reject=] |p| with a "{{NotAllowedError}}" {{DOMException}}.
239+
1. [=Queue a global task=] on the [=permissions task source=] given |global| to [=/reject=] |p| with a "{{NotAllowedError}}" {{DOMException}}.
240240

241241
<h3 id="navigation">Changes to navigation</h3>
242242

@@ -285,21 +285,21 @@ The Storage Access API defines a [=powerful feature=] identified by the [=powerf
285285

286286
Note: The "denied" permission state is not revealed to avoid exposing the user's decision to developers. This is done to prevent retaliation against the user and repeated prompting to the detriment of the user experience.
287287
</dd>
288-
<dt>[=powerful feature/permission key type]</dt>
288+
<dt>[=powerful feature/permission key type=]</dt>
289289
<dd>
290-
A [=permission key] of the "<a permission><code>storage-access</code></a>" feature has the type ([=site=], [=/origin=]).
290+
A [=permission key=] of the "<a permission><code>storage-access</code></a>" feature has the type ([=site=], [=/origin=]).
291291
</dd>
292-
<dt>[=powerful feature/permission key generation algorithm]</dt>
292+
<dt>[=powerful feature/permission key generation algorithm=]</dt>
293293
<dd>
294-
To generate a new [=permission key] for the "<a permission><code>storage-access</code></a>" feature, given an [=environment settings object=] |settings|, run the following steps:
294+
To generate a new [=permission key=] for the "<a permission><code>storage-access</code></a>" feature, given an [=environment settings object=] |settings|, run the following steps:
295295

296296
1. Let |topLevelSite| be |settings|' [=top-level site=].
297297
1. Let |embeddedOrigin| be |settings|' [=environment settings object/origin=].
298298
1. Return (|topLevelSite|, |embeddedOrigin|).
299299
</dd>
300-
<dt>[=powerful feature/permission key comparison algorithm]</dt>
300+
<dt>[=powerful feature/permission key comparison algorithm=]</dt>
301301
<dd>
302-
To compare the [=permission keys] |key1| and |key2| for the "<a permission><code>storage-access</code></a>" feature, run the following steps:
302+
To compare the [=permission keys=] |key1| and |key2| for the "<a permission><code>storage-access</code></a>" feature, run the following steps:
303303

304304
1. If |key1|[0] is not [=same site=] with |key2|[0], return false.
305305
1. If |key1|[1] is not [=same origin=] with |key2|[1], return false.

0 commit comments

Comments
 (0)