Skip to content

Instantly share code, notes, and snippets.

@dstorey
Forked from robnyman/Fullscreen API, cancelling.js
Last active December 31, 2015 05:29
Show Gist options
  • Save dstorey/7940784 to your computer and use it in GitHub Desktop.
Save dstorey/7940784 to your computer and use it in GitHub Desktop.
if (document.exitFullscreen) {
document.exitFullscreen();
}
else if (document.webkitExitFullscreen {
document.webkitExitFullscreen();
}
else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment