Window.ongamepaddisconnected

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

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.

解析

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

示例

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

Specifications

Specification
Gamepad
# event-gamepaddisconnected

Browser compatibility

BCD tables only load in the browser

See also