This documentation is archived and is not being maintained.
This documentation is archived and is not being maintained.
msOrientation property
Gets the orientation of the screen.
This property is read-only.
Syntax
JavaScript
ptr = object.msOrientation
Property values
Type: DOMString
Value
Condition
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).