interface Navigator { }; interface Event { };
interface Gamepad { readonly attribute DOMString id; readonly attribute long index; readonly attribute boolean connected; readonly attribute DOMHighResTimeStamp timestamp; readonly attribute GamepadMappingType mapping; readonly attribute double[] axes; readonly attribute GamepadButton[] buttons; }; enum GamepadMappingType { "", "standard" }; interface GamepadButton { readonly attribute boolean pressed; readonly attribute double value; }; [Constructor(DOMString type, optional GamepadEventInit eventInitDict)] interface GamepadEvent : Event { readonly attribute Gamepad? gamepad; }; dictionary GamepadEventInit : EventInit { Gamepad? gamepad = null; }; partial interface Navigator { Gamepad[] getGamepads(); };