Skip to content

Commit

Permalink
Move fully active check and check also in parallel (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed May 27, 2024
1 parent 54b800f commit 377e5a3
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ <h3>
<li>Let |document:Document| be [=this=]'s [=relevant global
object=]'s [=associated Document=].
</li>
<li data-tests="wakelock-active-document.https.window.html">If
|document| is not [=Document/fully active=], return [=a promise
rejected with=] with a {{"NotAllowedError"}} {{DOMException}}.
</li>
<li data-tests=
"wakelock-disabled-by-permissions-policy.https.sub.html">If
|document| is not [=allowed to use=] the [=policy-controlled
Expand All @@ -326,10 +330,6 @@ <h3>
|document|, return [=a promise rejected with=] a
{{"NotAllowedError"}} {{DOMException}}.
</li>
<li data-tests="wakelock-active-document.https.window.html">If
|document| is not [=Document/fully active=], return [=a promise
rejected with=] with a {{"NotAllowedError"}} {{DOMException}}.
</li>
<li data-tests="wakelock-document-hidden-manual.https.html">If
|document|'s [=Document/visibility state=] is "`hidden`", return [=a
promise rejected with=] {{"NotAllowedError"}} {{DOMException}}.
Expand Down Expand Up @@ -359,6 +359,15 @@ <h3>
source</a> given |document|'s <a>relevant global object</a> to
run these steps:
<ol>
<li>If |document| is not [=Document/fully active=], then:
<ol>
<li>Reject |promise| with a {{"NotAllowedError"}}
{{DOMException}}.
</li>
<li>Abort these steps.
</li>
</ol>
</li>
<li>If |document|'s [=Document/visibility state=] is
"`hidden`", then:
<ol>
Expand Down

0 comments on commit 377e5a3

Please sign in to comment.