This question is probably a duplicate of the question you contacted. Latest cross-browser solution:
function requestFullScreen(elt) { console.log("Requesting fullscreen for", elt); if (elt.requestFullscreen) { elt.requestFullscreen(); } else if (elt.msRequestFullscreen) { elt.msRequestFullscreen(); } else if (elt.mozRequestFullScreen) { elt.mozRequestFullScreen(); } else if (elt.webkitRequestFullscreen) { elt.webkitRequestFullscreen(); } else { console.error("Fullscreen not available"); } }
Please note that this is an “experimental technology” in this post. See this answer and this MDN page for more details.
Luke source share