W3C home > Mailing lists > Public > public-webevents@w3.org > October to December 2011

Re: gamepad property on events?

From: Scott Graham <scottmg@google.com>
Date: Wed, 5 Oct 2011 07:53:16 -0700
Message-ID: <CANHK6RZuBk6qJ-scay_DqCdB9kENMp2PLy5rBYAdXkZ1YQNAXg@mail.gmail.com>
To: Ted Mielczarek <ted@mielczarek.org>
Cc: public-webevents@w3.org
On Tue, Oct 4, 2011 at 9:59 AM, Ted Mielczarek <ted@mielczarek.org> wrote:

> While finishing up my prototype Gamepad API implementation for Gecko,
> I realized that the way I've implemented something no longer makes
> much sense. We've discussed exposing the set of connected gamepads on
> a "navigator.gamepads[]" property (the exact location is not important
> at the moment). Currently in what I've implemented, each gamepad DOM
> event has a ".gamepad" property containing a DOMGamepad object with
> the full state of the device. However, if there's a
> navigator.gamepads, does it make more sense to instead simply have a
> ".index" property on the events, which indexes into
> navigator.gamepads?

I think getting a gamepad object in the event is probably easier to
understand, rather than getting an index that has to be combined with
gamepads[]. I would expect it to be the same object as is in the gamepads
array though.
Received on Wednesday, 5 October 2011 14:53:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:54 UTC