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: https://github.com/web-platform-tests/wpt/blob/master/infrastructure/testdriver/bidi/bluetooth/simulate_adapter.https.html
On Wed, Oct 22, 2025 at 5:07 PM Rick Byers <[email protected]> wrote: > 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. > > On Wed, Oct 22, 2025 at 11:06 AM Alex Russell <[email protected]> > wrote: > >> LGTM1 >> >> On Monday, October 20, 2025 at 5:01:20 AM UTC-7 Chromestatus wrote: >> >>> *Contact emails* >>> [email protected] >>> >>> *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 >>> <https://issues.chromium.org/issues?q=customfield1222907:%22Blink%3EGamepadAPI%22> >>> >>> *Web Feature ID* >>> gamepad <https://webstatus.dev/features/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 >>> <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>?* >>> 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 >>> <https://chromestatus.com>. >>> >> -- >> 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 [email protected]. >> To view this discussion visit >> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/dbfc8da3-ef7b-446e-8e8f-f9e0927f3c56n%40chromium.org >> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/dbfc8da3-ef7b-446e-8e8f-f9e0927f3c56n%40chromium.org?utm_medium=email&utm_source=footer> >> . >> > -- > 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 [email protected]. > To view this discussion visit > https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY8JpZA3%3DbbKmmnBUR5WPXGgYeZN1YK0kY%3DtkOv4_LaEqw%40mail.gmail.com > <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY8JpZA3%3DbbKmmnBUR5WPXGgYeZN1YK0kY%3DtkOv4_LaEqw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYdVAm74HP_YnU-ottj9xOjqYPnYv%3DNvTYw_v27j37AtXg%40mail.gmail.com.
