This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

exitFullscreen

Summary

The exitFullscreen method provides a way for exiting the fullscreen mode enabled by requestFullscreen.

Method of dom/Documentdom/Document

Syntax

 document.exitFullscreen();

Return Value

No return value

Examples

//exit fullscreen on Enter key
document.addEventListener("keydown", function(e) {
  if (e.keyCode == 13) {
    document.exitFullscreen();
  }
}, false);

Related specifications

Fullscreen
Working Draft

See also

Other articles