<?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>27549</bug_id>
          
          <creation_ts>2014-12-09 17:25:22 +0000</creation_ts>
          <short_desc>Support holes or undefined values in the sequences as return values?</short_desc>
          <delta_ts>2014-12-09 18:59:51 +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>WebIDL</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>
          
          <blocked>26181</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Olli Pettay">bugs</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>d</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>ted</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>116054</commentid>
    <comment_count>0</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2014-12-09 17:25:22 +0000</bug_when>
    <thetext>Gamepad spec might want to be able return sequences which have holes.
sequence&lt;optional FooBar&gt; as a return value could be quite readable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116056</commentid>
    <comment_count>1</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-12-09 17:26:45 +0000</bug_when>
    <thetext>HOLES ARE EVIL.

Just use undefined instead?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116057</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-12-09 17:30:12 +0000</bug_when>
    <thetext>&gt; HOLES ARE EVIL.

Tell that to UA authors, who all produced arrays with holes here.  :(

But yes, we could just make it undefined; still need IDL syntax for it, ideally.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116060</commentid>
    <comment_count>3</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2014-12-09 17:33:50 +0000</bug_when>
    <thetext>sequence&lt;optional FooBar&gt; leading to an array which doesn&apos;t have holes but just
values defined to be undefined would be ok to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116064</commentid>
    <comment_count>4</comment_count>
    <who name="Ted Mielczarek [:ted]">ted</who>
    <bug_when>2014-12-09 18:59:51 +0000</bug_when>
    <thetext>Olli filed this bug after discussing bug 27549. Right now implementations are mixed on what to do with removed devices in the return value of getGamepads. Firefox returns an array with nulls where they used to be, Chrome returns a GamepadList which does not have the indicies of removed devices as properties (hasOwnProperty returns false for removed indicies), and IE returns a thing that claims to be an Array but also acts the same way (does not have properties for removed indicies). bug 26181 comment 5 describes the behaviors there.

I&apos;m okay with changing the spec as long as we can change it to say something that makes sense in terms of web standards, and also isn&apos;t incredibly different from current implementations.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>