Bug 1833142: Make pointerlock_utils.addFullscreenChangeContinuation wait for active...
commit2b757a35f2dde351e9a0a153380aaa4a586efeeb
authorBrad Werth <bwerth@mozilla.com>
Mon, 29 Jan 2024 21:18:44 +0000 (29 21:18 +0000)
committerBrad Werth <bwerth@mozilla.com>
Mon, 29 Jan 2024 21:18:44 +0000 (29 21:18 +0000)
treea178f5fef8eb768ae3550abbb4b27acec3fbb0fc
parent878dd2b1aaf617b98afb358326cb2fb6bf088b1d
Bug 1833142: Make pointerlock_utils.addFullscreenChangeContinuation wait for active browsingContext. r=smaug

Since pointerlockchange events will be silently dropped on an inactive
browsingContext, it is useful to wait for the browsingContext to become
active in addFullscreenChangeContinuation. The most likely behavior of
the callback is to trigger a pointerlockchange event, so we should
guarantee that we're ready for it, and error if we know that we'll fail.

Differential Revision: https://phabricator.services.mozilla.com/D199788
dom/tests/mochitest/pointerlock/pointerlock_utils.js