Last active
August 29, 2015 14:14
-
-
Save baptistebriel/41a3a0d0afe0c606dbd8 to your computer and use it in GitHub Desktop.
screen.orientation
This file contains hidden or 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
if (screen.lockOrientation) { | |
screen.lockOrientation('portrait-primary'); | |
} | |
else if (screen.mozLockOrientation) { | |
screen.mozLockOrientation('portrait-primary'); | |
} | |
else if (screen.orientation && screen.orientation.lock) { | |
screen.orientation.lock('portrait-primary'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment