fullscreen api

Solutions on MaxInterview for fullscreen api by the best coders in the world

showing results for - "fullscreen api"
Victoire
26 Nov 2019
1document.addEventListener("keypress", function(e) {
2  if (e.keyCode === 13) {
3    toggleFullScreen();
4  }
5}, false);
6
Marta
31 Jan 2020
1function toggleFullScreen() {
2  if (!document.fullscreenElement) {
3      document.documentElement.requestFullscreen();
4  } else {
5    if (document.exitFullscreen) {
6      document.exitFullscreen();
7    }
8  }
9}