The GamepadEvent()
constructor creates a new GamepadEvent
object.
Syntax
var gamepadEvent = new GamepadEvent(typeArg, options)
Parameters
- typeArg
- A
DOMString
that must be one ofgamepadconnected
orgamepaddisconnected
. - options Optional
- Options are as follows:
gamepad
- An instance of
Gamepad
describing the gamepad associated with the event.
- An instance of
Specifications
Specification | Status | Comment |
GamepadThe definition of 'GamepadEvent_' in that specification. | Working Draft | Initial definition. |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
GamepadEvent() constructor
|
Chrome
Full support 35 |
Edge
Full support 12 |
Firefox Full support 29 Full support 29 No support 24 — 28 Disabled' From version 24 until version 28 (exclusive): this feature is behind the |
IE
No support No |
Opera
Full support 22 |
Safari
Full support 10.1 |
WebView Android
Full support 37 |
Chrome Android
Full support 35 |
Firefox Android
Full support 32 |
Opera Android
Full support 22 |
Safari iOS
Full support 10.3 |
Samsung Internet Android
Full support 3.0 |
Legend
- Full support
- Full support
- No support
- No support
- User must explicitly enable this feature.'
- User must explicitly enable this feature.
GamepadEvent() by Mozilla Contributors is licensed under CC-BY-SA 2.5.