Skip to content

Instantly share code, notes, and snippets.

@dineshkummarc
Forked from robnyman/Fullscreen API.js
Created October 9, 2012 12:28
Show Gist options
  • Select an option

  • Save dineshkummarc/3858519 to your computer and use it in GitHub Desktop.

Select an option

Save dineshkummarc/3858519 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