Reports whether or not full-screen mode is available. Full screen mode is available only for a page that has no windowed plug-ins in any of its documents, and if all <iframe>
elements which contain the document have their allowfullscreen
attribute set.
SyntaxEdit
var isFullScreenAvailable = document.mozFullScreenEnabled;
On return, isFullScreenAvailable
is true
if the document can be put into full-screen mode.
ExampleEdit
function requestFullScreen() {
if (document.mozFullScreenEnabled) {
videoElement.requestFullScreen();
} else {
console.log('your browser cannot use fullscreen right now');
}
}
NotesEdit
See Using full-screen mode for details and examples.
Browser compatibilityEdit
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | ? | 10.0 (10.0) | ? | ? | ? |
SpecificationsEdit
This method has been proposed in the specification draft