Back to Content

DeviceOrientationEvent: alpha property

files/en-us/web/api/deviceorientationevent/alpha/index.md

latest983 B
Original Source

{{APIRef("Device Orientation Events")}}{{securecontext_header}}

The alpha read-only property of the {{domxref("DeviceOrientationEvent")}} interface returns the rotation of the device around the Z axis; that is, the number of degrees by which the device is being twisted around the center of the screen. See Orientation and motion data explained for details.

Value

A number.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
  • {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
  • {{domxref("Window.deviceorientation_event", "deviceorientation")}} event
  • {{domxref("Window.deviceorientationabsolute_event", "deviceorientationabsolute")}} event