Last active
June 22, 2018 18:36
-
-
Save robnyman/1705463 to your computer and use it in GitHub Desktop.
Fullscreen API, cancelling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (document.exitFullscreen) { | |
document.exitFullscreen(); | |
} | |
else if (document.mozCancelFullScreen) { | |
document.mozCancelFullScreen(); | |
} | |
else if (document.webkitCancelFullScreen) { | |
document.webkitCancelFullScreen(); | |
} | |
else if (document.msExitFullscreen) { | |
document.msExitFullscreen(); | |
} |
Firefox 50.1.0 for Ubuntu can't work。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IE11 supports the Fullscreen API now, with the ms prefix. I’ve created a fork that includes it, but I don’t see pull requests on Gists. Would be nice to include it here and in your article.