The Document.onfullscreenchange property is an event handler for the fullscreenchange event that is fired when a document goes in or out of the fullscreen mode.


targetDocument.onfullscreenchange = fullscreenChangeHandler;


document.onfullscreenchange = function ( event ) { 
  console.log("FULL SCREEN CHANGE")
document.documentElement.onclick = function () {
  // requestFullscreen() must be in an event handler or it will fail


Specification Status Comment
Fullscreen API
The definition of 'onfullscreenchange' 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, adyouri, jpmedley, SphinxKnight, teoli
Last updated by: fscholz,