Skip to content

Instantly share code, notes, and snippets.

@neuralvis
Forked from robnyman/Fullscreen API.js
Created February 2, 2012 19:59
Show Gist options
  • Save neuralvis/1725427 to your computer and use it in GitHub Desktop.
Save neuralvis/1725427 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();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment