Created
March 17, 2012 23:20
-
-
Save lpirir/2066418 to your computer and use it in GitHub Desktop.
Javascript code to show full screen browser
This file contains 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
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
Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.