If |document|'s [=Document/visibility state=] is
+ "`hidden`", then:
Reject |promise| with a {{"NotAllowedError"}}
{{DOMException}}.
@@ -677,12 +676,13 @@
Handling document loss of visibility
- This specification defines the following external now hidden
- algorithm, which is run when the user agent determines that the
- [=Document/visibility state=] of a {{Document}} |document:Document|
- of a top-level browsing context has become `hidden`:
+ This specification defines the following [=page visibility change
+ steps=] with [=Document/visibility state=] |state| and
+ |document:Document|:
+
If |state| is not "`hidden`", abort these steps.
+
[=list/For each=] |lock:WakeLockSentinel| in
|document|.{{Document/[[ActiveLocks]]}}["`screen`"]:
@@ -692,10 +692,6 @@