Document.fullscreenEnabled is a read-only instance property that tells you whether fullscreen mode is available for this document. Learn how to guard requestFullscreen(), how it differs from fullscreenElement, iframe allowfullscreen rules, and five examples with try-it labs.
01
Kind
Read-only property
02
Returns
boolean
03
Means
Can enter?
04
vs
fullscreenElement
05
Guard
Before request
06
Status
Limited avail.
Fundamentals
Introduction
Before calling element.requestFullscreen(), it helps to know whether the browser will allow it. document.fullscreenEnabled answers that question with a simple true or false.
MDN: the read-only property indicates whether or not fullscreen mode is available. It is part of the Fullscreen API alongside fullscreenElement and the deprecated fullscreen flag.
💡
Limited availability
MDN marks this property Limited availability (not Baseline). It is not Deprecated, Experimental, or Non-standard—still feature-detect ("fullscreenEnabled" in document) before relying on it.
A read-only instance property on Document that reports Fullscreen API availability—not whether fullscreen is currently active.
Value — true if the document and its elements can enter fullscreen via requestFullscreen(); otherwise false (MDN).
Plug-ins — MDN: unavailable when the page has windowed plug-ins in any of its documents.
Containers — MDN: unavailable if a containing element (for example an iframe) lacks the allowfullscreen attribute.
Lenient setter — assigning does not throw; the write is ignored (MDN).
Pair with — check before requestFullscreen(); use fullscreenElement to see active state.
Foundation
📝 Syntax
JavaScript
document.fullscreenEnabled
Value
A boolean: true when fullscreen can be requested; false when it cannot (MDN).
MDN guard example
JavaScript
function requestFullscreen() {
if (document.fullscreenEnabled) {
videoElement.requestFullscreen();
} else {
console.log("Your browser cannot use fullscreen right now");
}
}
MDN recommends this guard so users see a clear message instead of a silent failure.
📈 UI, Compare & Detect
Wire buttons, compare with active state, and feature-detect safely.
Example 3 — Enable or Disable the Fullscreen Button
Hide or disable controls when the API is unavailable.
JavaScript
const btn = document.getElementById("fs-btn");
if (!document.fullscreenEnabled) {
btn.disabled = true;
btn.title = "Fullscreen is not available in this context";
} else {
btn.addEventListener("click", () => {
document.getElementById("stage").requestFullscreen();
});
}
Document.fullscreenEnabled is marked Limited availability on MDN (not Baseline). Feature-detect before production use. Logos use the shared browser-image-sprite.png sprite from this project.
✓ Limited availability · Not Baseline
Document.fullscreenEnabled
Read-only boolean — whether this document can enter fullscreen via the Fullscreen API.
LimitedCheck compat
Google ChromeWidely supported · Desktop & Mobile
Supported
Mozilla FirefoxSupported in modern versions
Supported
Apple SafariSupported with Fullscreen API
Supported
Microsoft EdgeChromium support
Supported
OperaFollow Chromium behavior
Supported
Internet ExplorerNot modern Fullscreen API
No / legacy only
Document.fullscreenEnabledLimited availability
Bottom line: Check fullscreenEnabled before requestFullscreen(). Pair with fullscreenElement for active state and fullscreenchange for UI sync.
Wrap Up
Conclusion
Document.fullscreenEnabled tells you whether fullscreen mode is available before you call requestFullscreen(). Pair it with fullscreenElement for active state and handle iframe allowfullscreen requirements from MDN.
Check document.fullscreenEnabled before requesting fullscreen
Feature-detect with "fullscreenEnabled" in document
Disable or hide buttons when the API is unavailable
Set allowfullscreen on embedding iframes (MDN)
Still handle fullscreenerror after the guard
❌ Don’t
Confuse fullscreenEnabled with fullscreenElement
Assign to fullscreenEnabled hoping to enable the API
Assume every browser is Baseline for this property
Skip user feedback when fullscreen is blocked
Rely on deprecated document.fullscreen instead
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about document.fullscreenEnabled
Boolean availability check for the Fullscreen API.
5
Core concepts
📄01
Returns
boolean
API
✓02
true
Can enter
Allowed
🔒03
false
Blocked
MDN rules
🎬04
Guard
Before request
MDN
🔄05
vs
fullscreenElement
Allowed vs active
❓ 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 Document.fullscreenEnabled as 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 element (such as an 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 a failed request.
Did you know?
A page can report fullscreenEnabled: true while fullscreenElement is still null. The first means “you may request fullscreen”; the second means “nothing is fullscreen yet.”