Fullscreen API

Allows an element to be displayed covering the entire screen

Uses

  • Displaying video at maximum size
  • Games
  • Talks
  • Projections
  • Second screen functionality
  • Apps

Example

addEventListener('fullscreenButtonClick', function(event) {
  var element = document.getElementById("display");
  if(element.requestFullscreen) {
    element.requestFullscreen();
  } else if(element.mozRequestFullScreen) {
    element.mozRequestFullScreen();
  } else if(element.webkitRequestFullscreen) {
    element.webkitRequestFullscreen();
  } else if(element.msRequestFullscreen) {
    element.msRequestFullscreen();
  }
});