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.

fullscreenEnabled

Summary

Exposes the current document’s fullscreen capability, returning true if the document can display elements in fullscreen, or false if not.

Property of dom/Documentdom/Document

Syntax

Note: This property is read-only.

var result = document.fullscreenEnabled;

Return Value

Returns an object of type BooleanBoolean

Returns true if document has the ability to display elements fullscreen, or false otherwise.

Examples

function canDisplayFullScreen() {
  if (document.fullscreenEnabled) {
    // document can display elements in full-screen mode
    return true;
  }
  else {
    // document cannot display elements in full-screen mode
    return false;
  }
}

Related specifications

W3C Fullscreen Module
Working Draft

See also

Tutorial: Using the full-screen API