@mounirlamouri wrote
> Is there a recommended pattern by the TAG or commonly used one from other specifications?
I was actually thinking of filing a bug on the TAG as this particular situation is not _exactly_ covered by either the API Design Guide or the Promises Guide.
Regardless, the "pending promise" effectively represents the screen having changed:
```JS
const pendingPromise = new Promise(r => {
screen.orientation.addEventListener("change", ()=> r(), { once: true });
});
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/screen-orientation/pull/147#issuecomment-460476428