W3cubDocs

/Web APIs

Window.ongamepaddisconnected

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Experimental: 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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
ongamepaddisconnected
35
21-35
≤18
29
No
22
15-22
10.1
No
35
25-35
32
22
14-22
No
3.0
1.5-3.0
secure_context_required
86
86
91
No
72
No
No
86
91
61
No
No

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Window/ongamepaddisconnected