[w3c/screen-orientation] Should pending promise be abort if document isn't top-level? (Issue #257)

makotokato created an issue (w3c/screen-orientation#257)

In [spec](https://w3c.github.io/screen-orientation/#handling-unloading-documents), 

> 8.6 Handling unloading documents
>
> Whenever the [unloading document cleanup steps](https://html.spec.whatwg.org/multipage/document-lifecycle.html#unloading-document-cleanup-steps) run with a document, the user agent MUST run the following steps:
>
> 1.  If document is not a [top-level browsing context](https://html.spec.whatwg.org/multipage/document-sequences.html#top-level-browsing-context)'s [active document](https://html.spec.whatwg.org/multipage/document-sequences.html#nav-document), abort these steps.
> 2.  Run the [fully unlock the screen orientation steps](https://w3c.github.io/screen-orientation/#dfn-fully-unlock-the-screen-orientation-steps) with document.

But the last test in [active-lock.html](https://github.com/web-platform-tests/wpt/blob/master/screen-orientation/active-lock.html) is whether promise is aborted or not for iframe document.  My understand is that iframe document isn't "top-level browsing context's active document", so this step is do nothing.  So I confuse this WPT.

Should we abort pending promise even if document isn't top- level?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/screen-orientation/issues/257
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/screen-orientation/issues/257@github.com>

Received on Wednesday, 7 May 2025 07:52:48 UTC