[w3c/screen-orientation] Apply an orientation lock rejects its own newly created promise (#198)

In `7.2.3`:
> Set doc's `[[orientationPendingPromise]]` to a newly-created promise.

Then in `7.2.4.2`:
> Let _browsing contexts_ be the list of the descendant browsing contexts of the top-level browsing context's document. 

Since doc's browsing context is a descendant of the top-level browsing context's document, doc's browsing context will itself be in _browsing contexts_.

Then in `7.2.4.2`:
> If one of the _browsing contexts_'s document's `[[orientationPendingPromise]]` is not `null`

which will be `true`, since it was set in `7.2.3`, so we have to do `7.2.4.2.2`:
> Reject doc's [[orientationPendingPromise]] with "AbortError" DOMException.

Since this is done in parallel with the `7.2.4.5` "Lock the orientation of the document to orientations." if it completes first we will reject the new promise that was just created.

It seems to me that `7.2.4.2` needs to somehow exclude the promise created in `7.2.3`



-- 
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/issues/198

Received on Tuesday, 21 April 2020 17:10:23 UTC