The Document.onfullscreenerror property is an event handler for the fullscreenchange event that is fire when a document goes that cannot go in fullscreen mode, even it has been requested.


targetDocument.onfullscreenerror = fullscreenErrorHandler;


document.onfullscreenerror = function ( event ) { 
  console.log("FULL SCREEN DENIED")

// requestFullscreen() will fail because it is outside of an event handler


Specification Status Comment
Fullscreen API
The definition of 'onfullscreenerror' in that specification.
Living Standard Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support45 ?471 ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support4545 ?471 ? ? ?

1. From version 47: this feature is behind the full-screen-api.unprefix.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

See also

Document Tags and Contributors

Contributors to this page: fscholz, jpmedley, teoli
Last updated by: fscholz,