<?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>18809</bug_id>
          
          <creation_ts>2012-09-09 10:37:54 +0000</creation_ts>
          <short_desc>Some examples in the index section (3.3.4) have errors</short_desc>
          <delta_ts>2013-03-01 19:54:14 +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>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Arthur Barstow">art.barstow</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>jsbell</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>73493</commentid>
    <comment_count>0</comment_count>
    <who name="Arthur Barstow">art.barstow</who>
    <bug_when>2012-09-09 10:37:54 +0000</bug_when>
    <thetext>The following email reported errors in the examples in the &quot;index&quot; section (3.3.4):

[[
http://lists.w3.org/Archives/Public/public-webapps/2012JulSep/0672.html

As far as I can tell, there is no &quot;openIndex&quot; method as shown in the &quot;var index&quot; example below.  I think it should be objectStore.index() ?  Also, I am assuming that the var vtx is a versionchange transaction object, but vtx is not defined anywhere else in the documentation.  Just figured I would pass these along :)   

3.3.4 Index

var db = indexedDBSync.open(&apos;AddressBook&apos;, 2, function(trans, oldVersion) {
  if (oldVersion === 1) {
    trans.db.createObjectStore(&apos;Contact&apos;, {keyPath:&apos;id&apos;, autoIncrement:true});
  }
  var store = vtx.objectStore(&apos;Contact&apos;);
  store.createIndex(&apos;ContactName&apos;, {unique:false, multiEntry:false});
});

var index = store.openIndex(&apos;ContactName&apos;);
var id = index.get(&apos;Lincoln&apos;);
// id === 1
]]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83883</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2013-03-01 19:54:14 +0000</bug_when>
    <thetext>Fixed in https://dvcs.w3.org/hg/IndexedDB/rev/8fa2c15e036c

Not that anyone cares about the sync API. The async API examples are still AWOL.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>