Intent to Ship: Gamepad ongamepadconnected and ongamepaddisconnected event handler attributes

115 views
Skip to first unread message

Chromestatus

unread,
Oct 20, 2025, 8:01:20 AMOct 20
to blin...@chromium.org, mattre...@google.com, or...@igalia.com
Contact emails
or...@igalia.com

Specification
https://w3c.github.io/gamepad/#extensions-to-the-windoweventhandlers-interface-mixin

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.

Blink component
Blink>GamepadAPI

Web Feature ID
gamepad

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.

Initial public proposal
No information provided

TAG review
No information provided

TAG review status
Not applicable

Risks


Interoperability and Compatibility
No information provided

Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1697093)

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=223860)

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No information provided


Debuggability
No information provided

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
No

Is this feature fully tested by web-platform-tests?
Yes
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

Flag name on about://flags
No information provided

Finch feature name
No information provided

Non-finch justification
This feature just adds another way of exposing gamepad connection/disconnection information as per spec.

Rollout plan
Will ship enabled for all users

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/issues/40175074

Estimated milestones

No milestones specified



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

No information provided

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5109540852989952?gate=6264903576977408

Links to previous Intent discussions
Intent to Prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d72b07.050a0220.1ba43a.0097.GAE%40google.com


This intent message was generated by Chrome Platform Status.

Alex Russell

unread,
Oct 22, 2025, 11:06:02 AMOct 22
to blink-dev, Chromestatus, mattre...@google.com, or...@igalia.com
LGTM1

Rick Byers

unread,
Oct 22, 2025, 11:07:30 AMOct 22
to Alex Russell, blink-dev, Chromestatus, mattre...@google.com, or...@igalia.com
LGTM2

Would be nice to have testdriver.js automation for this (instead of just that the attribute exists), but seems small enough that I'm OK not blocking on this.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/dbfc8da3-ef7b-446e-8e8f-f9e0927f3c56n%40chromium.org.

Vladimir Levin

unread,
Oct 22, 2025, 11:07:42 AMOct 22
to blink-dev, Rick Byers, blink-dev, Chromestatus, mattre...@google.com, or...@igalia.com, Alex Russell
LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Philip Jägenstedt

unread,
Oct 22, 2025, 11:11:42 AMOct 22
to Rick Byers, Alex Russell, blink-dev, Chromestatus, mattre...@google.com, or...@igalia.com
These are just event handler attributes, but for larger Gamepad API changes it would indeed to be nice to consider device mocking for testing. I think something like this for Bluetooth might be a pattern to follow:

Orko Garai

unread,
Oct 24, 2025, 12:10:30 PM (13 days ago) Oct 24
to blink-dev, Philip Jägenstedt, sligh...@chromium.org, blink-dev, Chromestatus, mattre...@google.com, Orko Garai, rby...@chromium.org
Sorry one clarification: This should be supported on all platforms.
Reply all
Reply to author
Forward
0 new messages