Last active
July 10, 2018 16:28
-
-
Save lenivene/f29bcfa0602605dd69c8ed7861118c8d to your computer and use it in GitHub Desktop.
Cross browser screen lock 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
var win = window, | |
lockOrientation = win.screen.lockOrientation || win.screen.mozLockOrientation || win.screen.msLockOrientation || function(){ | |
return null; | |
} | |
if( lockOrientation ){ | |
/** | |
* Parameters | |
* [ portrait-primary, portrait-secondary, landscape-primary, landscape-secondary, portrait, landscape, default ] | |
*/ | |
lockOrientation('portrait'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment