Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

MSOrientationChange | onmsorientationchange event

Dispatched whenever a change in screen orientation occurs.

IE11

 

Syntax

HTML Attribute <element onmsorientationchange = "handler(event)">
addEventListener Method object.addEventListener("MSOrientationChange", handler, useCapture)

 

Event information

SynchronousYes
BubblesNo
CancelableNo

 

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

screen

 

 

Show:
© 2015 Microsoft