<?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>26904</bug_id>
          
          <creation_ts>2014-09-25 17:07:10 +0000</creation_ts>
          <short_desc>Introduce typedef for IDBKeyPath, use it</short_desc>
          <delta_ts>2015-01-09 21:21:34 +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>Indexed Database API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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="Joshua Bell">jsbell</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>jackalmage</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>112180</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2014-09-25 17:07:10 +0000</bug_when>
    <thetext>The IDB spec could be simplified by adding:

typedef (DOMString or sequence&lt;DOMString&gt;) IDBKeyPath;

And then using it in a handful of places:

interface IDBObjectStore {
  readonly attribute IDBKeyPath? keyPath; // replacing &apos;any&apos;
  IDBIndex createIndex (DOMString name, IDBKeyPath keyPath, optional IDBIndexParameters optionalParameters); // replacing explicit union
}

dictionary IDBObjectStoreParameters {
    IDBKeyPath? keyPath = null; // replacing explicit union
};

interface IDBIndex {
    readonly attribute IDBKeyPath keyPath; // replacing &apos;any&apos;
}

This would not change the defined behavior at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112186</commentid>
    <comment_count>1</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2014-09-25 17:55:29 +0000</bug_when>
    <thetext>Per WebIDL, `sequence&lt;Foo&gt;` can&apos;t be used as an attribute/const/etc type.  It&apos;s only valid as an argument type or a return type.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112192</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2014-09-25 19:05:28 +0000</bug_when>
    <thetext>*sigh* Right. May be why we didn&apos;t do this earlier.

We could use two different typedefs, (DOMString or sequence&lt;DOMString&gt;) for the operation params and (DOMString or DOMString[]) for the readonly attributes. Kinda lame, though.

Not very important anyway; I&apos;ll probably punt this unless someone else feels passionate about it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>