gecko-dev/testing/web-platform/tests/interfaces/generic-sensor.idl
autofoolip b460015001 Bug 1536265 [wpt PR 15867] - Update interfaces/generic-sensor.idl, a=testonly
Automatic update from web-platform-tests
Update interfaces/generic-sensor.idl (#15867)

Source: https://github.com/tidoust/reffy-reports/blob/e0218fe/whatwg/idl/generic-sensor.idl
Build: https://travis-ci.org/tidoust/reffy-reports/builds/506822321
--

wpt-commits: c96dccf9a11965a17104d87c06f9f7a1641cdfc9
wpt-pr: 15867
2019-04-01 14:43:50 +01:00

60 lines
1.5 KiB
Text

// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: Generic Sensor API (https://w3c.github.io/sensors/)
[SecureContext, Exposed=(DedicatedWorker, Window)]
interface Sensor : EventTarget {
readonly attribute boolean activated;
readonly attribute boolean hasReading;
readonly attribute DOMHighResTimeStamp? timestamp;
void start();
void stop();
attribute EventHandler onreading;
attribute EventHandler onactivate;
attribute EventHandler onerror;
};
dictionary SensorOptions {
double frequency;
};
[Constructor(DOMString type, SensorErrorEventInit errorEventInitDict),
SecureContext, Exposed=(DedicatedWorker, Window)]
interface SensorErrorEvent : Event {
readonly attribute DOMException error;
};
dictionary SensorErrorEventInit : EventInit {
required DOMException error;
};
dictionary MockSensorConfiguration {
required MockSensorType mockSensorType;
boolean connected = true;
double? maxSamplingFrequency;
double? minSamplingFrequency;
};
dictionary MockSensor {
double maxSamplingFrequency;
double minSamplingFrequency;
double requestedSamplingFrequency;
};
enum MockSensorType {
"ambient-light",
"accelerometer",
"linear-acceleration",
"gravity",
"gyroscope",
"magnetometer",
"uncalibrated-magnetometer",
"absolute-orientation",
"relative-orientation",
"geolocation",
"proximity",
};
dictionary MockSensorReadingValues {
};