Window: gamepaddisconnected event

The gamepaddisconnected event is fired when the browser detects that a gamepad has been disconnected.

Bubbles No
Cancelable No
Interface GamepadEvent
Event handler property ongamepaddisconnected

The event will not fire if disallowed by the document's gamepad Feature Policy.

Examples

window.addEventListener('gamepaddisconnected', event => {
    console.log('Lost connection with the gamepad.');
});

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
gamepaddisconnected_event
35
21-35
≤18
29
No
22
15-22
10.1
37
37
32
Yes
No
3.0

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/gamepaddisconnected_event