interface Event {
};
interface Error {
};
dictionary EventInit {
};
interface EventTarget {
};
interface EventHandler {
};
[SecureContext]
interface Sensor : EventTarget {
readonly attribute boolean activated;
readonly attribute DOMHighResTimeStamp? timestamp;
void start();
void stop();
attribute EventHandler onchange;
attribute EventHandler onactivate;
attribute EventHandler onerror;
};
dictionary SensorOptions {
double? frequency;
};
[SecureContext, Constructor(DOMString type, SensorErrorEventInit errorEventInitDict)]
interface SensorErrorEvent : Event {
readonly attribute Error error;
};
dictionary SensorErrorEventInit : EventInit {
required Error error;
};
typedef (Float32Array or Float64Array or DOMMatrix) RotationMatrixType;
interface OrientationSensor : Sensor {
readonly attribute FrozenArray? quaternion;
void populateMatrix(RotationMatrixType targetMatrix);
};
[Constructor(optional SensorOptions sensorOptions)]
interface AbsoluteOrientationSensor : OrientationSensor {
};