The spec currently says says "Whenever the unloading document cleanup steps run with a document, fully exit fullscreen document."
Working on #65, I wrote web-platform-tests/wpt#5887 which was supposed to test this and passes in Firefox, but I've realized there are at least these problems:
- The exit fullscreen algorithm does nothing if the document is not fully active. Is a document fully active when unload a document runs? @annevk?
- If the exit fullscreen algorithm did run as usual, part of it is async after the resize, and event should then be fired. They aren't in Firefox, and I don't think it'd make sense to fire events.
It's tempting to just use unfullscreen a document, but when the top-level browsing context is navigated something has to "resize topLevelDoc’s viewport to its "normal" dimensions" and that's currently a part of the exit fullscreen algorithm.
The spec currently says says "Whenever the unloading document cleanup steps run with a document, fully exit fullscreen document."
Working on #65, I wrote web-platform-tests/wpt#5887 which was supposed to test this and passes in Firefox, but I've realized there are at least these problems:
It's tempting to just use unfullscreen a document, but when the top-level browsing context is navigated something has to "resize topLevelDoc’s viewport to its "normal" dimensions" and that's currently a part of the exit fullscreen algorithm.