https://github.com/web-platform-tests/wpt
Raw File
Tip revision: a99112edef5480c5a92159a8bf772af8ef00fc85 authored by Lennart Grahl on 24 May 2018, 22:01:25 UTC
fixup! fixup! Add an ugly workaround for createDataChannelPair to make it work in Safari
Tip revision: a99112e
accelerometer.idl
[Constructor(optional AccelerometerSensorOptions options), SecureContext,
  Exposed=Window]
interface Accelerometer : Sensor {
  readonly attribute double? x;
  readonly attribute double? y;
  readonly attribute double? z;
};

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

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

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

[Constructor(optional AccelerometerSensorOptions options), SecureContext,
  Exposed=Window]
interface GravitySensor : Accelerometer {
};
back to top