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

[gamepad] .gamepads vs. function access

From: Scott Graham <scottmg@google.com>
Date: Tue, 18 Oct 2011 10:58:32 -0700
Message-ID: <CANHK6RYyaVtejVyAydpg+8q-6Na0W1-2Mf=02Dx2QR0YgX4kJg@mail.gmail.com>
To: public-webevents@w3.org

Currently, the gamepad spec says it's navigator.gamepads to get
polling-style access to the gamepad data.

In writing some sample code, I'm finding it feels a bit odd because
you don't know when the data is updated.

I'm inclined towards "navigator.pollGamepads()" or maybe
"navigator.getGamepads()" to make it more clear that you're getting a
copy that's (hopefully) up-to-date at that point.

Any positive or negative feelings on that?

Received on Tuesday, 18 October 2011 17:59:02 UTC

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