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

Source: https://github.com/tidoust/reffy-reports/blob/1c5a999/ed/idl/generic-sensor.idl
Build: https://travis-ci.org/tidoust/reffy-reports/builds/588932563
--

wpt-commits: 9765c1f7e97616fe9d19990194508c1cf51a47bf
wpt-pr: 19250
2019-09-26 20:26:14 +00: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;
};
[SecureContext, Exposed=(DedicatedWorker, Window)]
interface SensorErrorEvent : Event {
constructor(DOMString type, SensorErrorEventInit errorEventInitDict);
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 {
};