WebIDLpedia

Gamepad interface

Definition

Gamepad defines Gamepad

[Exposed=Window]
interface Gamepad {
  readonly attribute DOMString id;
  readonly attribute long index;
  readonly attribute boolean connected;
  readonly attribute DOMHighResTimeStamp timestamp;
  readonly attribute GamepadMappingType mapping;
  readonly attribute FrozenArray<double> axes;
  readonly attribute FrozenArray<GamepadButton> buttons;
  [SameObject] readonly attribute GamepadHapticActuator vibrationActuator;
};

This interface is extended in the following specifications:

Consolidated IDL (across mixin and partials)
[Exposed=Window]
interface Gamepad {
  readonly attribute DOMString id;
  readonly attribute long index;
  readonly attribute boolean connected;
  readonly attribute DOMHighResTimeStamp timestamp;
  readonly attribute GamepadMappingType mapping;
  readonly attribute FrozenArray<double> axes;
  readonly attribute FrozenArray<GamepadButton> buttons;
  [SameObject] readonly attribute GamepadHapticActuator vibrationActuator;
  readonly attribute GamepadHand hand;
  readonly attribute FrozenArray<GamepadHapticActuator> hapticActuators;
  readonly attribute GamepadPose? pose;
  readonly attribute FrozenArray<GamepadTouch>? touchEvents;
};

Methods and attributes that return objects implementing Gamepad

Referring IDL interfaces/dictionaries

Referring specifications