Document.fullscreenEnabled is a read-only Boolean that is true when fullscreen mode is available for this document (you may call Element.requestFullscreen()), otherwise false (MDN).
Read the notes below before you get or set this property. Prefer feature detection when support is limited.
Syntax
Use document.fullscreenEnabled. Start with this line.
JavaScript
document.fullscreenEnabled
Call
What it does
document.fullscreenEnabled
Primary signature.
Built into the browser. Read or assign document.fullscreenEnabled — no import required.
Library declarations
JavaScript
document.fullscreenEnabled
Parameters
Parameter
Description
allowfullscreen on iframes
Optional. Required for iframe documents (MDN)
Return Value
Return Value
Description
*
Boolean (true / false)
JavaScript Examples
Example 1 — Read fullscreenEnabled
Log whether fullscreen is available in the current document.
JavaScript
console.log(document.fullscreenEnabled);
// true or false
Read the Boolean. No arguments — access document.fullscreenEnabled.
Interpret true. The document may call requestFullscreen().
Interpret false. Do not offer fullscreen (or explain why).
Context matters. An iframe without allowfullscreen may report false.
Example 2 — Guard Before requestFullscreen() (MDN)
Check availability first, then enter — or log a friendly message.
JavaScript
function requestFullscreen(videoElement) {
if (document.fullscreenEnabled) {
videoElement.requestFullscreen();
} else {
console.log("Your browser cannot use fullscreen right now");
}
}
// Demo without a real video element:
if (document.fullscreenEnabled) {
console.log("Fullscreen is available — safe to call requestFullscreen().");
} else {
console.log("Your browser cannot use fullscreen right now");
}
Fullscreen is available — safe to call requestFullscreen().
How It Works
Gate the call. Only request fullscreen when the flag is true.
Avoid failed attempts. When false, skip requestFullscreen().
Tell the user. MDN’s message pattern keeps UX clear.
Still need a gesture. Browsers usually require a click even when enabled.
Example 3 — Enabled vs Currently Active
Availability (fullscreenEnabled) is not the same as “in fullscreen now.”
JavaScript
const allowed = document.fullscreenEnabled;
const active = document.fullscreenElement !== null;
console.log(allowed); // can we enter?
console.log(active); // are we in fullscreen now?
// Common combo: allowed && !active → show "Enter fullscreen"
Read capability.fullscreenEnabled answers “is the API allowed?”
Read state.fullscreenElement !== null answers “are we fullscreen?”
Typical combo. Allowed + not active → show an Enter control.
Do not mix them up. A page can be allowed and still not currently fullscreen.
Compatibility
Browser Support
Document.fullscreenEnabled is marked Limited availability on MDN (not Baseline). It is not Deprecated, Experimental, or Non-standard — still feature-detect in production.
✓ Limited availability · Not Baseline
Document.fullscreenEnabled
Read-only Boolean — true when Element.requestFullscreen() is allowed for this document.
LtdLimited availability
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
fullscreenEnabledLimited
Bottom line: Check document.fullscreenEnabled before calling requestFullscreen(). Pair with fullscreenElement for current state, and listen for fullscreenchange / fullscreenerror.
Frequently Asked Questions
A boolean: true if the document and its elements can enter fullscreen via Element.requestFullscreen(), or false if fullscreen mode is not available (MDN).
No. MDN does not mark it Deprecated, Experimental, or Non-standard. It is Limited availability (not Baseline), so feature-detect in production.
fullscreenEnabled asks whether fullscreen is allowed at all. fullscreenElement tells you which element (if any) is currently in fullscreen.
MDN: when the page has windowed plug-ins in any of its documents, or when a containing iframe lacks the allowfullscreen attribute.
The property is read-only, but assigning does not throw — even in strict mode. The setter is a no-operation and is ignored (MDN).
Yes. MDN recommends checking it first so you can show a friendly message instead of attempting a request that cannot succeed.