Window.ongamepadconnected

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The ongamepadconnected property of the Window interface represents an event handler that will run when a gamepad is connected (when the gamepadconnected event fires).

The event object is of type GamepadEvent.

Syntax

window.ongamepadconnected = function() { ... };

Examples

window.ongamepadconnected = function(event) {
  // All buttons and axes values can be accessed through
  event.gamepad;
};

Specifications

Specification Status Comment
Unknown
The definition of 'gamepadconnected event' in that specification.
Working Draft Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support

35

21 — 35 webkit

Yes29 No

22

15 — 22 webkit

10.1
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? ? Yes32 No No Yes

See also

Document Tags and Contributors

Contributors to this page: wbamberg, chrisdavidmills
Last updated by: wbamberg,