[Bug 26181] New: Spec should specify the presentation of the array returned by navigator.getGamepads() w.r.t "holes"

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

            Bug ID: 26181
           Summary: Spec should specify the presentation of the array
                    returned by navigator.getGamepads() w.r.t "holes"
           Product: WebAppsWG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Gamepad
          Assignee: ted@mielczarek.org
          Reporter: ted@mielczarek.org
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-webapps@w3.org

Currently the spec is silent about how the gamepad array should look in the
face of removing Gamepads.

What Firefox implements (I need to check other browsers) is like:

<no gamepads connected>
navigator.getGamepads() == []

<connect gamepad 1>
navigator.getGamepads() == [Gamepad]

<connect gamepad 2>
navigator.getGamepads() == [Gamepad, Gamepad]

<disconnect gamepad 1>
navigator.getGamepads() == [null, Gamepad]

The intent is that the array is always at least max(Gamepad.index)+1 length,
and entries where there's no longer a Gamepad present are "holes". Firefox uses
null for their values, but Chrome and IE use undefined, so the spec should
clarify that. (undefined seems sensible)

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

Received on Monday, 23 June 2014 18:39:26 UTC