Skip to content
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
20 changes: 19 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ spec:webidl; type:interface; text:Promise
A |descriptor|'s <dfn export local-lt="state">permission state</dfn> for
an optional <a>environment settings object</a> |settings| is
the result of the following algorithm, which returns one of
{{PermissionState/"granted"}}, {{PermissionState/"prompt"}}, or {{PermissionState/"denied"}}:
the {{PermissionState}} enum values or failure:
</p>
<ol class="algorithm">
<li>
Expand All @@ -213,6 +213,9 @@ spec:webidl; type:interface; text:Promise
<code>|descriptor|.{{PermissionDescriptor/name}}</code> and |settings| has an
<a>associated `Document`</a> named <var>document</var>, run the following step:
<ol class="algorithm">
<li>
If |document| is not [=Document/fully active=], return failure.
</li>
<li>
If <var>document</var> is not <a>allowed to use</a> the feature
identified by <code>|descriptor|.{{PermissionDescriptor/name}}</code>
Expand Down Expand Up @@ -464,6 +467,12 @@ spec:webidl; type:interface; text:Promise
it MUST asynchronously run the following steps:
</p>
<ol>
<li>
Let |document| this |status|'s [=relevant global object=]'s [=associated Document=].
<li>
<li>
If |document| is null or |document| is not [=Document/fully active=], terminate this algorithm.
</li>
<li>
Run <code><var>status</var>@{{PermissionStatus/[[query]]}}.{{PermissionDescriptor/name}}</code>'s <a>permission
query algorithm</a>, passing <code><var>status</var>@{{PermissionStatus/[[query]]}}</code>
Expand Down Expand Up @@ -512,6 +521,15 @@ spec:webidl; type:interface; text:Promise
<var>permissionDesc</var>:
</p>
<ol>
<li>
If [=this=] [=relevant global object=] is a {{Window}} object, then:
<ol>
<li>If the [=current settings object's=] <a>associated `Document`</a> is not
[=Document/fully active=], return [=a promise rejected with=] a
{{"InvalidStateError"}} {{DOMException}}.
</li>
</ol>
</li>
<li>Let |rootDesc| be the object |permissionDesc| refers to, <a>converted to
an IDL value</a> of type {{PermissionDescriptor}}. If this throws an
exception, return <a>a promise rejected with</a> that exception and abort
Expand Down