LGTM2 to match other vendors and the spec. Thanks for cleaning this up. -mike
On Thu, Dec 9, 2021 at 10:08 AM Yoav Weiss <[email protected]> wrote: > LGTM1 > Thanks for fixing this papercut! > > On Thu, Dec 9, 2021 at 9:39 AM 'François Beaufort 🇫🇷' via blink-dev < > [email protected]> wrote: > >> Contact emails >> >> [email protected] >> >> [email protected] >> >> >> Specification >> >> https://www.w3.org/TR/gamepad/#extensions-to-the-navigator-interface >> >> >> Summary >> >> We intend to replace GamepadList with sequence<Gamepad?> for >> navigator.getGamepads() return value to follow the spec and match >> current Gecko and WebKit implementations. >> >> >> Blink component >> >> Blink>GamepadAPI >> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EGamepadAPI> >> >> >> Motivation >> >> The W3C Gamepad spec defines the value returned by >> navigator.getGamepads() as a sequence<Gamepad?>, but Chrome is the only >> browser to implement it as a GamepadList. It has a similar interface (as >> it provides an operator[] getter and length attribute) but is not >> identical as it also provides an .item() accessor. Because of that, web >> developers tend to use [...navigator.getGamepads()] when they could >> simply use the Array returned by navigator.getGamepads(). >> >> >> TAG review >> >> As Gecko and WebKit already implement this spec, a TAG review doesn't >> seem required. >> >> >> Risks >> >> I've scanned the httparchive.response_bodies.2021_11_01_desktop table >> and found 995 URLs that contain “.getGamepads()” and “.item(“. Roughly half >> of them are from the A-Frame, TDV Player, and ArcGIS libraries and don’t >> use the Gamepad API “.item()” accessor. I’ve looked at 20 randomly picked >> URLs and didn’t find a single one using the Gamepad API “.item()” accessor. >> They are used for other APIs like NodeList or TouchList, and not the return >> value of navigator.getGamepads(). >> > > Given that HA contains 5776330 pages for this run, that's 0.017% of HA > origins. But given the fact that there are other explanations to the > presence of `item()`, and that out of a random sample you found none that > would actually break is reassuring. > It's also reassuring that any page that would break after this change is > one that's already broken in Gecko and WebKit. > > >> >> >> Results are publicly available at >> https://docs.google.com/spreadsheets/d/e/2PACX-1vSFs3guk11lnMMIyvt6pFR586oRYxO0ap20uF1i7U7CZW8aRDS7kJYw05MQCZ3CcijT-Zxq2HFgQcOC/pubhtml >> >> >> >> Interoperability and Compatibility >> >> >> >> Gecko: Spec compliant already >> >> WebKit: Spec compliant already >> >> Web developers: Positive ( >> https://www.youtube.com/watch?v=pIIHJ-NIyes&t=527s) >> >> >> >> Debuggability >> >> No specific DevTools changes are required. This feature is treated like >> any other JS event/attribute. >> >> >> Is this feature fully tested by web-platform-tests >> <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md> >> ? >> >> Yes. See https://wpt.fyi/results/gamepad >> >> >> Tracking bug >> >> https://crbug.com/708201 >> >> >> Estimated milestones >> >> M99 >> >> >> Link to entry on the Chrome Platform Status >> >> https://www.chromestatus.com/feature/5693119438782464 >> >> >> -- >> 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 on the web visit >> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5K7%2BajfRH0LOxOnitYwG0Hkn5W3M5GevxaOL-CpacCpCA%40mail.gmail.com >> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5K7%2BajfRH0LOxOnitYwG0Hkn5W3M5GevxaOL-CpacCpCA%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 on the web visit > https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfVxaFyZyqfvk4SsjvH0p%3DqOfqP8akChF-LDCAQcNOp2nA%40mail.gmail.com > <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfVxaFyZyqfvk4SsjvH0p%3DqOfqP8akChF-LDCAQcNOp2nA%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 on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3DdqFFVqu4pDYb%3DqpZoFjaO_RVUrRjMoUvZfavQNJk%2BWbA%40mail.gmail.com.
