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 onreading;
  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;
};
[Constructor(optional SensorOptions sensorOptions)]
interface Gyroscope : Sensor {
  readonly attribute unrestricted double? x;
  readonly attribute unrestricted double? y;
  readonly attribute unrestricted double? z;
};