JS 如何判断当前页面是否全屏
程序员文章站
2022-04-18 11:28:56
...
// 监听全屏事件触发
fullscreenchange() {
let isFullScreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
if (isFullScreen) {
// 进入全屏
} else {
// 退出全屏
}
},