[Bug 21434] Need to spec liveness of Gamepad objects

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21434

Philip Jägenstedt <philipj@opera.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |philipj@opera.com

--- Comment #4 from Philip Jägenstedt <philipj@opera.com> ---
Live Array-like objects like NodeList are more work to implement and test, we
should avoid making more of them.

That navigator.getGamepads()[0] === navigator.getGamepads()[0] should always
hold true seems like a given, otherwise you'll necessarily have multiple
Gamepad objects representing the same underlying hardware, and the mess of
updating all of them. Unless the idea is that a Gamepad object is a snapshot
and you have to call getGamepads() every time you want to check for changes?
Easy to implement, but a bit odd...

Finally, navigator.getGamepads() === navigator.getGamepads()? Returning a new
array every time seems easier bindings-wise at least in Blink. It does require
having a separate array internally to keep track of the Gamepad objects so that
you don't create new one. Spec'ing and testing how the return value of
getGamepads() is reused seems like an unnecessary burden to me.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 18 December 2014 15:25:37 UTC