Re: [w3c/screen-orientation] Add hidden document monitoring in parallel orientation lock steps (PR #272)

@Copilot commented on this pull request.

## Pull Request Overview

Adds monitoring for documents transitioning to hidden during the parallel steps of the "apply orientation lock" algorithm, aligning behavior with existing fully-active monitoring and ensuring consistent AbortError rejections.
- Add a new step to abort and reject the pending lock promise if the document’s visibility state becomes "hidden".
- Keep behavior consistent with the existing fully-active check by rejecting with AbortError and aborting the steps.





---

<sub>**Tip:** Customize your code reviews with copilot-instructions.md. <a href="/w3c/screen-orientation/new/gh-pages/.github?filename=copilot-instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Create the file</a> or <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">learn how to get started</a>.</sub>

> @@ -694,6 +694,11 @@ <h2>
             not `null`, [=reject and nullify the current lock promise=] of
             |document| with an {{"AbortError"}} and abort these steps.
             </li>
+            <li>If |document|'s [=Document/visibility state=] becomes "hidden", and

The Bikeshed link [=Document/visibility state=] likely targets the IDL interface rather than the concept; for the concept defined in HTML it should be [=document/visibility state=], or if you intend the IDL attribute, use {{Document/visibilityState}}. Suggest updating for a correct autolink.
```suggestion
            <li>If |document|'s [=document/visibility state=] becomes "hidden", and
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/screen-orientation/pull/272#pullrequestreview-3348549037
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/screen-orientation/pull/272/review/3348549037@github.com>

Received on Friday, 17 October 2025 06:50:52 UTC