Deprecate non-standard GamepadList item method |
|
Issue descriptionThe W3C Gamepad spec defines the value returned by navigator.getGamepads() as a sequence<Gamepad?>, but Chrome implements it as a GamepadList. GamepadList has a similar interface (it provides an operator[] getter and length attribute) but is not identical as it also provides an .item() accessor. The item accessor should be deprecated to match the spec and to allow Chrome's implementation to expose this value as sequence<Gamepad?> more easily.
,
Jul 20
I took a look in httparchive for resources containing both 'getGamepads' and '.item(' to see if I could find something that would break:
https://bigquery.cloud.google.com/savedquery/762219082167:e859a577d6ac4e7c866020caff35f248
Looking at the 34 results, which is very few to begin with, looking through all of the '.item(' matches all of them seemed to be for other APIs like NodeList, and not the return value of getGamepads.
Based on analysis like that, I'd be happy to LGTM this removal on blink-dev without any deprecation period even.
Alternatively, a more conservative approach would be to add use counters for the use of the item method, but you have to split the anonymous getter from the item() method to only measure the latter.
,
Nov 5
I updated the chromestatus entry (removed milestone) that referred to this bug, because it didn't seem to be correct. |
|
►
Sign in to add a comment |
|
Comment 1 by mattreynolds@chromium.org
, Jul 19