#import #import #import // https://w3c.github.io/gamepad/#dom-gamepadmappingtype enum GamepadMappingType { "", "standard", "xr-standard", }; // https://w3c.github.io/gamepad/#dom-gamepad [Exposed=Window] interface Gamepad { readonly attribute Utf16DOMString id; readonly attribute long index; readonly attribute boolean connected; readonly attribute DOMHighResTimeStamp timestamp; readonly attribute GamepadMappingType mapping; readonly attribute FrozenArray axes; readonly attribute FrozenArray buttons; [FIXME] readonly attribute FrozenArray touches; [SameObject] readonly attribute GamepadHapticActuator vibrationActuator; }; // https://w3c.github.io/gamepad/#idl-def-navigator-partial-1 [Exposed=Window] partial interface Navigator { sequence getGamepads(); };