The GamepadEvent_ constructor creates a new GamepadEvent object.


var gamepadEvent = new GamepadEvent(typeArg, options)


A DOMString that must be one of gamepadconnected or gamepaddisconnected.
options Optional
Options are as follows:
  • gamepad: An instance of Gamepad describing the gamepad associated with the event.


Specification Status Comment
The definition of 'GamepadEvent_' in that specification.
Working Draft Initial definition.

Browser compatibility


FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support3512


24 — 281

No22 No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No35 Yes3222 No Yes

1. From version 24 until version 28 (exclusive): this feature is behind the dom.gamepad.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

Document Tags and Contributors

Contributors to this page: jpmedley
Last updated by: jpmedley,