← Back to release summary

Gamepad ongamepadconnected and ongamepaddisconnected event handler attributes

Category
Device
Type
Chromium catches up
Status
Proposed (Chrome Proposed)
Intent stage
None

WPT details: The wpt test below checks for the presence of the event handler IDL attributes: https://wpt.fyi/results/gamepad/idlharness.window.html?label=experimental&label=master&aligned

Summary

Add ongamepadconnected and ongamepaddisconnected event handlers to the WindowEventHandlers interface mixin. This would enable support for window.ongamepad[dis]connected or document.body.ongamepad[dis]connected event handler attributes.

Motivation

The gamepad[dis]connected events can be subscribed to using window.addEventListener() currently. This adds the ability to use window.ongamepad[dis]connected event handler attributes as well.

Standards & signals

Ecosystem

View on chromestatus.com