Answers for "Full Screen mode"

0

Full Screen mode

async function FullScreenOn() {
  document.getElementById("fullscreenElement")
    .requestFullscreen()
    .then((response) => {
       console.log("full screen on");
    })
    .catch((error) => {
       console.log("Error: ", error);
    });
}

async function FullScreenOff() {
  document.exitFullscreen()
    .then((response) => {
       console.log("full screen off");
    })
    .catch((error) => {
       console.log("Error: ", error);
    });
}
Posted by: Guest on December-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language