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