Using this code direct from https://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers/
if (docElm.requestFullscreen) {
docElm.requestFullscreen();
}
else if (docElm.msRequestFullscreen) {
docElm = document.body; //overwrite the element (for IE)
docElm.msRequestFullscreen();
}
else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
}
else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
let arTable=[];
for(let h=0; h<12; h++) {
setTimeout(function () {
arTable.push(window.innerHeight);
},(interval*h));
}