Document.fullscreenElement is a read-only property that returns the Element currently shown in fullscreen mode, or null if fullscreen is not active (MDN).
Read the notes below before you get or set this property. Prefer feature detection when support is limited.
Syntax
Use document.fullscreenElement. Start with this line.
JavaScript
document.fullscreenElement
Call
What it does
document.fullscreenElement
Primary signature.
Built into the browser. Read or assign document.fullscreenElement — no import required.
Library declarations
JavaScript
document.fullscreenElement
Parameters
Parameter
Description
Fullscreen element
Optional. Returned node (topmost if several)
fullscreenEnabled
Optional. Whether the Fullscreen API is allowed
Return Value
Return Value
Description
*
Element or null
JavaScript Examples
Example 1 — Read fullscreenElement
Log the current fullscreen element (usually null on a normal page).
JavaScript
console.log(document.fullscreenElement);
// null when not in fullscreen
Optional chaining.?. safely skips when fullscreenElement is null.
Check nodeName."VIDEO" means a video element is fullscreen.
Return a Boolean. Useful for custom video chrome or analytics.
Same idea for others. Swap "VIDEO" for "IMG", "CANVAS", etc. as needed.
Compatibility
Browser Support
Document.fullscreenElement 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.fullscreenElement
Read-only Element in fullscreen, or null — widely implemented in modern engines; verify for your support matrix.
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
fullscreenElementLimited
Bottom line: Prefer fullscreenElement !== null over deprecated document.fullscreen. Enter with element.requestFullscreen(), exit with document.exitFullscreen(), and listen for fullscreenchange.
Frequently Asked Questions
The Element currently presented in fullscreen mode in this document, or null if fullscreen mode is not in use (MDN).
No. MDN does not mark it Deprecated, Experimental, or Non-standard. It is Limited availability (not Baseline), so feature-detect in production.
Use document.fullscreenElement !== null. This replaces the deprecated document.fullscreen Boolean.
MDN: the topmost (most recently requested) element is returned.
The property is read-only, but assigning does not throw — even in strict mode. The setter is a no-operation and is ignored (MDN).
Call element.requestFullscreen() to enter and document.exitFullscreen() to leave. Listen for fullscreenchange to update UI.