This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://fullscreen.spec.whatwg.org/#:fullscreen-pseudo-class If an element at the top of its node document's fullscreen element stack is moved to another document, does the :fullscreen pseudo-class still apply until the old document's fullscreen element stack is updated in exitFullscreen()? If yes, it becomes a bit harder to implement :fullscreen, one would have to have a flag per element instead of checking the the element's node document's fullscreen element stack. Do not like. If no, scripts will immediately observe the change in element.matches(':fullscreen') but the change in oldDocument.fullscreenElement will be async. That's a bit weird, but maybe OK.
Why would the change to oldDocument.fullscreenElement be asynchronous? As far as I can tell it is identical to :fullscreen.
It's the difference between an element being at the top of any document's fullscreen element stack, and being at the top of that element's node document's fullscreen element stack. The latter makes more sense I think.
Oh I see. The removing steps are sometimes synchronous and sometimes not. As per that other bug. This sucks.
The spec now says what I asked for: "The :fullscreen pseudo-class must match any element that is that element's node document's fullscreen element."