Class DeviceOrientationEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The DeviceOrientationEvent interface of the {{domxref("Device Orientation Events", "", "", "nocode")}} provides web developers with information from the physical orientation of the device running the web page.
[Value("DeviceOrientationEvent")]
public class DeviceOrientationEvent : Event
- Inheritance
-
DeviceOrientationEvent
- Inherited Members
Remarks
-{{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")}}
-DeviceMotionEvent
-Window.Devicemotion event
-Window.Deviceorientation event
-Window.Deviceorientationabsolute event
Constructors
DeviceOrientationEvent()
public DeviceOrientationEvent()
DeviceOrientationEvent(string, DeviceOrientationEventInit)
The DeviceOrientationEvent() constructor creates a new DeviceOrientationEvent object.
public DeviceOrientationEvent(string type, DeviceOrientationEventInit eventInitDict = null)
Parameters
typestringeventInitDictDeviceOrientationEventInit
Remarks
Properties
Absolute
The absolute read-only property of the DeviceOrientationEvent interface indicates whether or not the device is providing orientation data absolutely (that is,
in reference to the Earth's coordinate frame) or using some arbitrary frame determined
by the device.
See Orientation and motion data explained for details.
[Value("absolute")]
public bool Absolute { get; }
Property Value
Remarks
-{{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")}}
-Window.Deviceorientation event
-Window.Deviceorientationabsolute event
Alpha
The alpha read-only property of the 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("alpha")]
public Number? Alpha { get; }
Property Value
- Number
A number.
Remarks
-{{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")}}
-Window.Deviceorientation event
-Window.Deviceorientationabsolute event
Beta
The beta read-only property of the DeviceOrientationEvent interface returns the rotation of the device around the X axis; that is, the number of degrees,
ranged between -180 and 180, by which the device is tipped forward or backward.
See Orientation and motion data explained for details.
[Value("beta")]
public Number? Beta { get; }
Property Value
- Number
A number.
Remarks
-{{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")}}
-Window.Deviceorientation event
-Window.Deviceorientationabsolute event
Gamma
The gamma read-only property of the DeviceOrientationEvent interface returns the rotation of the device around the Y axis; that is, the number of degrees,
ranged between -90 and 90, by which the device is tilted left
or right.
See Orientation and motion data explained for details.
[Value("gamma")]
public Number? Gamma { get; }
Property Value
- Number
A number.
Remarks
-{{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")}}
-Window.Deviceorientation event
-Window.Deviceorientationabsolute event
Methods
RequestPermission(bool)
[Value("requestPermission")]
public static Task<PermissionState> RequestPermission(bool absolute = false)
Parameters
absolutebool