Skip to content

Instantly share code, notes, and snippets.

@robnyman
Last active February 12, 2018 23:42
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save robnyman/1704368 to your computer and use it in GitHub Desktop.
Save robnyman/1704368 to your computer and use it in GitHub Desktop.
Fullscreen API
var docElm = document.documentElement;
if (docElm.requestFullscreen) {
docElm.requestFullscreen();
}
else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
}
else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
else if (docElm.msRequestFullscreen) {
docElm.msRequestFullscreen();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment