Normalize legacy.!!document.fullscreen makes a clear Boolean.
Compute modern.fullscreenElement !== null is the replacement check.
They should match. Both report the same active/inactive state.
Assign does nothing. MDN: the setter is a no-op and does not throw.
Compatibility
Browser Support
Document.fullscreen is Deprecated (MDN). Many engines still expose it for compatibility, but new projects should use document.fullscreenElement.
✓ Deprecated · Prefer fullscreenElement
Document.fullscreen
Obsolete Boolean fullscreen flag — still readable in many browsers for legacy scripts; replace with fullscreenElement !== null.
LegacyDeprecated API
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
document.fullscreenDeprecated
Bottom line: Safe to recognize in old code. For new work, check document.fullscreenElement, enter with element.requestFullscreen(), and exit with document.exitFullscreen().
Frequently Asked Questions
A Boolean that is true if the document is currently displaying an element in fullscreen mode; otherwise false (MDN).
Yes. MDN marks Document.fullscreen as Deprecated (obsolete). Prefer checking document.fullscreenElement !== null in new code.
Use Document.fullscreenElement. If it is not null, fullscreen mode is active and that Element is the one being presented (MDN).
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. Check document.fullscreenEnabled when you need to know if the API is allowed.
No. Learn it to read legacy code. New checks should use fullscreenElement !== null.