且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

全屏API:触发了哪些事件?

更新时间:2023-10-30 18:00:16

您的链接显示答案 ...


成功启用全屏模式后,包含全屏元素的文档会收到 fullscreenchange 事件。退出全屏模式时,文档再次收到 fullscreenchange 事件。请注意, fullscreenchange 事件本身不会提供有关文档是进入还是退出全屏模式的任何信息,但是如果文档具有非null fullScreenElement ,你知道你处于全屏模式。

When full-screen mode is successfully engaged, the document which contains the full-screen element receives a fullscreenchange event. When full-screen mode is exited, the document again receives a fullscreenchange event. Note that the fullscreenchange event doesn't provide any information itself as to whether the document is entering or exiting full-screen mode, but if the document has a non null fullScreenElement , you know you're in full-screen mode.