Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
    });
}
Source by codewithsudeep.com #
 
PREVIOUS NEXT
Tagged: #Full #Screen #mode
ADD COMMENT
Topic
Name
5+5 =