GamepadEvent: GamepadEvent() constructor
Gamepad API
Gamepad API
The GamepadEvent() constructor creates a new GamepadEvent object.
Syntax
new GamepadEvent(type, options)
Parameters
type- : A string with the name of the event.
It is case-sensitive and browsers set it to
gamepadconnectedorgamepaddisconnected. options- : An object that, in addition of the properties defined in Event(), can have the following properties:
gamepad- : A Gamepad object describing the gamepad associated with the event.
Return value
A new GamepadEvent object.