Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fullscreen API, fullscreenchange
document.addEventListener("fullscreenchange", function () {
fullscreenState.innerHTML = (document.fullscreen)? "" : "not ";
}, false);
document.addEventListener("mozfullscreenchange", function () {
fullscreenState.innerHTML = (document.mozFullScreen)? "" : "not ";
}, false);
document.addEventListener("webkitfullscreenchange", function () {
fullscreenState.innerHTML = (document.webkitIsFullScreen)? "" : "not ";
}, false);
document.addEventListener("msfullscreenchange", function () {
fullscreenState.innerHTML = (document.msFullscreenElement)? "" : "not ";
}, false);
@jared-cxz
Copy link

jared-cxz commented Oct 4, 2016

Line 13, the event name "msfullscreenchange" is not working in IE11. I used "MSFullscreenChange" instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment