JS

HOW TO TOGGLE FULLSCREEN MODE IN JAVASCRIPT

FULLSCREEN - ENTIRE PAGE document.documentElement. requestFullscreen();   FULLSCREEN - SINGLE SECTION document.getElementById('ID'). requestFullscreen();   EXIT FULL SCREEN document.exitFullscreen();

JAVASCIPT FULLSCREEN

01

FULLSCREEN MODE CHANGED document.addEventListener( "fullscreenchange", () => {   if (document.fullscreenElement   ===null) { FULLSCREEN OFF }   else { FULLSCREEN ON } });

FULLSCREEN EVENTS

02

FULLSCREEN MODE ERROR document.addEventListener( "fullscreenerror", () =>  DO SOMETHING });