This documentation is archived and is not being maintained.
This documentation is archived and is not being maintained.
msLockOrientation method
Forces the rendering of the page into one (or several) specified way(s).
Important Locking the screen orientation is only possible when Internet Explorer is in full screen mode (by the user pressing F11, or via the Fullscreen API).
Syntax
var retVal = Screen.msLockOrientation(orientations);
Parameters
orientations [in]
Type: sequence<DOMString>
Value
Meaning
portrait-primary
The screen is in portrait mode, and the host device is right side up (if its normal orientation is in portrait mode), or the host device is rotated 90 degrees clockwise (if its normal orientation is in landscape mode).
landscape-primary
The screen is in landscape mode, and the host device is right side up (if its normal orientation is in landscape mode), or the host device is rotated 90 degrees counter-clockwise (if its normal orientation is in portrait mode).
portrait-secondary
The screen is in portrait mode, and the host device is upside down (if its normal orientation is in portrait mode), or the host device is rotated 90 degrees counter-clockwise (if its normal orientation is in landscape mode).
landscape-secondary
The screen is in landscape mode, and the host device is upside down (if its normal orientation is in landscape mode), or the host device is rotated 90 degrees clockwise (if its normal orientation is in portrait mode).
portrait
Value that represents both portrait-primary and portrait-secondary cases.
landscape
Value that represents both landscape-primary and landscape-secondary cases.
If the lock is done on only one orientation, the screen will stay on the given orientation and never change until the screen orientation is unlocked (with msUnlockOrientation). Otherwise, the screen orientation can change between any of the specified orientations it is locked to, as the user rotates the host device.