summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/interfaces/accelerometer.idl
blob: a082224dc88e10e043d86d09cbf981616f6bb9a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
// Source: Accelerometer (https://w3c.github.io/accelerometer/)

[SecureContext, Exposed=Window]
interface Accelerometer : Sensor {
  constructor(optional AccelerometerSensorOptions options = {});
  readonly attribute double? x;
  readonly attribute double? y;
  readonly attribute double? z;
};

enum AccelerometerLocalCoordinateSystem { "device", "screen" };

dictionary AccelerometerSensorOptions : SensorOptions {
  AccelerometerLocalCoordinateSystem referenceFrame = "device";
};

[SecureContext, Exposed=Window]
interface LinearAccelerationSensor : Accelerometer {
  constructor(optional AccelerometerSensorOptions options = {});
};

[SecureContext, Exposed=Window]
interface GravitySensor : Accelerometer {
  constructor(optional AccelerometerSensorOptions options = {});
};