Skip to content

Commit

Permalink
editorial: Use new HTML activation model
Browse files Browse the repository at this point in the history
Adapt to whatwg/html#5129 and follow the spec editing advice from
https://docs.google.com/document/d/14wT89JZ0qeRehXGkcn3_meXxjvlHKgM9d7aJj80kQcQ/edit ("User
Activation: Guidance for spec authors") by replacing "triggered by user
activation" with "the current global object has transient activation".

This makes ReSpec happy again.
  • Loading branch information
Raphael Kubo da Costa committed Feb 5, 2020
1 parent 92a2f7a commit a59a100
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ <h2>
<li>If |state| is {{PermissionState["prompt"]}}, run the following
steps:
<ol>
<li>If these <a>obtain permission</a> steps were not <a>triggered
by user activation</a>, return {{PermissionState["denied"]}}.
<li>If the <a>current global object</a> does not have [=transient
activation=], return {{PermissionState["denied"]}}.
</li>
<li>Return the result of <a>requesting permission to use</a> with
|permissionDesc|.
Expand All @@ -305,12 +305,11 @@ <h2>
<aside class="note">
In the case the steps are run from a dedicated worker, then the
<a>current global object</a> is a {{DedicatedWorkerGlobalScope}},
which means that the <a>obtain permission</a> steps can never be
<a>triggered by user activation</a>, meaning that in order to use
wake locks from a dedicated worker, prior permission needs to granted
from the <a>browsing context</a> who created it, e.g. the <a>browsing
context</a> that is exists in the {{DedicatedWorkerGlobalScope}}'s
[=WorkerGlobalScope/owner set=].
which means that it will never have [=transient activation=].
Consequently, in order to use wake locks from a dedicated worker,
prior permission needs to be granted from the <a>browsing context</a>
who created it, e.g. the <a>browsing context</a> that is exists in
the {{DedicatedWorkerGlobalScope}}'s [=WorkerGlobalScope/owner set=].
</aside>
</section>
</section>
Expand Down

0 comments on commit a59a100

Please sign in to comment.