- From: <bugzilla@jessica.w3.org>
- Date: Fri, 29 Mar 2013 17:26:04 +0000
- To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21434 --- Comment #1 from Scott Graham <scott.w3bugzilla@h4ck3r.net> --- (In reply to comment #0) > The discussion in bug 17309 made it clear that Scott and I have implemented > two different things in regards to the "liveness" of Gamepad objects. > Scott's Chrome implementation returns a static snapshot of each Gamepad when > you getGamepads(), whereas the Gamepad object attached to the > "ongamepadconnected" event in my Firefox implementation is live: you can get > the latest device state out of it at any time. > > We need to decide what the correct behavior here is and spec it. > > Obviously I'm biased in favor of my implementation, but I think it does have > one large benefit: we're expecting users to poll Gamepad status in a > requestAnimationFrame loop, so if you're generating new Gamepad objects for > every call to getGamepads() you're going to be generating a lot of garbage. (I'm honestly not sure precisely what I implemented.) I agree on the reducing garbage concern, and so returning/modifying the same objects sounds right to me. The part I don't like as much is that the data unexpectedly changes, and it's unclear when, and with what frequency it's updated. That's why I used getGamepads() as the sync point for "Please update the data in my gamepad objects to the most recent state". -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Friday, 29 March 2013 17:26:10 UTC