Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The GamepadEvent() constructor creates a new GamepadEvent object.
new GamepadEvent(type, options)typeA string with the name of the event. It is case-sensitive and browsers set it to gamepadconnected or gamepaddisconnected.
optionsAn object that, in addition of the properties defined in Event(), can have the following properties:
gamepadA Gamepad object describing the gamepad associated with the event.
A new GamepadEvent object.