<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27986</bug_id>
          
          <creation_ts>2015-02-09 11:13:40 +0000</creation_ts>
          <short_desc>Specify exact length of array returned by Navigator.getGamepads()</short_desc>
          <delta_ts>2015-04-24 11:03:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Gamepad</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philip Jägenstedt">philipj</reporter>
          <assigned_to name="Ted Mielczarek [:ted]">ted</assigned_to>
          <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>scott.w3bugzilla</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>117762</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-02-09 11:13:40 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#widl-Navigator-getGamepads-sequence-Gamepad

&quot;The length of the array returned must be at least one more than the maximum index value of the Gamepad objects returned in the array.&quot;

This offers more flexibility than seems useful, allowing e.g. an array of length 100 to always be returned. Always returning an array of the minimum length possible seems better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117764</commentid>
    <comment_count>1</comment_count>
    <who name="Ted Mielczarek [:ted]">ted</who>
    <bug_when>2015-02-09 12:03:42 +0000</bug_when>
    <thetext>I&apos;m not really sure why this is spec&apos;ed this way, I think Scott wrote that text. I know Chrome (and possibly IE) always return an Array of length 4 even when no gamepads are connected.

Firefox always returns an array of the minimum possible length.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117792</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-02-10 08:52:23 +0000</bug_when>
    <thetext>Yes, Chrome does that, but it makes no sense to me :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117793</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-02-10 08:53:31 +0000</bug_when>
    <thetext>I guess it made more sense when the object returned (GamepadList) is the same every time, less so when you return a new array every time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119884</commentid>
    <comment_count>4</comment_count>
    <who name="Ted Mielczarek [:ted]">ted</who>
    <bug_when>2015-04-24 11:03:25 +0000</bug_when>
    <thetext>Moved to https://github.com/w3c/gamepad/issues/13</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>