Fullscreen API has been unprefixed

Published: | Categories: DOM


The unprefixed Fullscreen API has been finally enabled by default in Firefox 64 on all the channels, after years of efforts to improve the cross-browser compatibility. The last unprefix attempt was made back in Firefox 47, which was soon cancelled except for the Nightly channel. The moz-prefixed API is now considered deprecated and will be removed in the future.

Google Chrome 71 is also shipping the unprefixed API in December 2018, almost at the same time as the Firefox 64 release.

Methods: These methods now return a Promise.

Prefixed Standard
Document.mozCancelFullScreen() Document.exitFullscreen()
Element.mozRequestFullScreen() Element.requestFullscreen()


Prefixed Standard
Document.mozFullScreen Document.fullscreen
Document.mozFullScreenElement Document.fullscreenElement
Document.mozFullScreenEnabled Document.fullscreenEnabled
Document.onmozfullscreenchange Document.onfullscreenchange
Document.onmozfullscreenerror Document.onfullscreenerror
Element.onmozfullscreenchange Element.onfullscreenchange
Element.onmozfullscreenerror Element.onfullscreenerror

Events: These events are now fired on the element first rather than document.

Prefixed Standard
mozfullscreenchange fullscreenchange
mozfullscreenerror fullscreenerror

CSS pseudo-class:

Prefixed Standard
:-moz-full-screen :fullscreen

Update: Firefox 65 and later will display a deprecation warning to some of these symbols in the console.