MSOrientationChange | onmsorientationchange event
Dispatched whenever a change in screen orientation occurs.
![]() |
Syntax
| HTML Attribute | <element onmsorientationchange = "handler(event)"> |
|---|---|
| addEventListener Method | object.addEventListener("MSOrientationChange", handler, useCapture) |
Event information
| Synchronous | Yes |
|---|---|
| Bubbles | No |
| Cancelable | No |
Event handler parameters
- handler [in]
-
Type: Function
Function to execute when the event is dispatched.
Standards information
Remarks
MSOrientationChange event dispatches a simple Event object. From this, you can determine the current screen orientation from the msOrientation property of the screen object:
function orientationChangeHandler(evt) { var orientation = evt.target.msOrientation; // Respond to the screen orientation change }
See also
Show:
