Summary
An event handler for the deviceorientation
events sent to the window.
Syntax
window.ondeviceorientation = funcRef;
Where funcRef
is a reference to a function. The function receives a DeviceOrientationEvent
object describing the device orientation change that occurred.
Specifications
Specification | Status | Comment |
---|---|---|
Device Orientation Events | Working Draft | Initial specification. |
Browser compatibility
Compatibility for DeviceOrientationEvent:
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 7.0 | 3.6 (mozOrientation), 6 |
? | ? | ? |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 3.0 | 3.6 (mozOrientation), 6 |
Not supported | Not supported | 4.2 |
Gecko-specific notes
Firefox 3.6, 4, and 5 supported mozOrientation instead of the standard DeviceOrientationEvent
interface
See also
Document Tags and Contributors
Tags:
Contributors to this page: fscholz, teoli, cpigat, jsx, LibreGeekingKid, dtbwije, Jeremie, Sheppy, kohei.yoshino
Last updated by:
fscholz,