EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

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

 

 

Afficher:
© 2014 Microsoft