Window.ongamepaddisconnected

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

The ongamepaddisconnected property of the Window interface represents an event handler that will run when a gamepad is disconnected (when the gamepaddisconnected event fires).

The event object is of type GamepadEvent.

Syntax

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

Examples

window.ongamepaddisconnected = function() {
  // A gamepad has been disconnected
};

Specifications

Specification Status Comment
Gamepad
The definition of 'gamepaddisconnected event' in that specification.
Working Draft Initial definition

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
ongamepaddisconnectedChrome Full support 35
Full support 35
No support 21 — 35
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Full support ≤18Firefox Full support 29IE No support NoOpera Full support 22
Full support 22
No support 15 — 22
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Safari Full support 10.1WebView Android ? Chrome Android Full support 35
Full support 35
No support 25 — 35
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Firefox Android Full support 32Opera Android Full support 22
Full support 22
No support 14 — 22
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Safari iOS No support NoSamsung Internet Android Full support 3.0
Full support 3.0
No support 1.5 — 3.0
Prefixed
Prefixed Implemented with the vendor prefix: webkit

Legend

Full support
Full support
No support
No support
Compatibility unknown
Compatibility unknown
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

See also