const toggleFullScreen = () => {
if (!document.fullscreen && !document.fullscreenElement) {
document.documentElement.requestFullscreen();
// false, null
} else {
document.exitFullscreen();
// true, html dom
}
}
document.addEventListener("keydown", (e) => {
// Enter
if (e.keyCode === 13) {
toggleFullScreen();
}
}, false);
07-04
5012
06-04
1272