Fix examples in IDBIndexSync 3.3.4. Bug 18809
authorJoshua bell <jsbell@google.com>
Fri, 01 Mar 2013 11:53:29 -0800
changeset 4048fa2c15e036c
parent 403 3662e5052bc0
child 405 49660ca248b0
Fix examples in IDBIndexSync 3.3.4. Bug 18809
Overview.html
Speclet_022_IDB_API_Synchronous_APIs.html
     1.1 --- a/Overview.html	Fri Mar 01 11:47:21 2013 -0800
     1.2 +++ b/Overview.html	Fri Mar 01 11:53:29 2013 -0800
     1.3 @@ -3688,11 +3688,12 @@
     1.4                index could be maintained on the <em>name</em> property of objects
     1.5                in the <em>Contact</em> <a>object store</a>.
     1.6              </p>
     1.7 -            <pre class="example highlight">var db = indexedDBSync.open('AddressBook', 2, function(trans, oldVersion) {
     1.8 +            <pre class="example highlight">
     1.9 +var db = indexedDBSync.open('AddressBook', 2, function(trans, oldVersion) {
    1.10    if (oldVersion === 1) {
    1.11      trans.db.createObjectStore('Contact', {keyPath:'id', autoIncrement:true});
    1.12    }
    1.13 -  var store = vtx.objectStore('Contact');
    1.14 +  var store = trans.objectStore('Contact');
    1.15    store.createIndex('ContactName', 'name', {unique:false, multiEntry:false});
    1.16  });
    1.17  </pre>
    1.18 @@ -3701,7 +3702,8 @@
    1.19                property value 'Lincoln' can be retrieved using the
    1.20                <em>ContactName</em> <a>index</a>.
    1.21              </p>
    1.22 -            <pre class="example highlight">var index = store.<a>openIndex</a>('ContactName');
    1.23 +            <pre class="example highlight">
    1.24 +var index = store.<a>index</a>('ContactName');
    1.25  var id = index.<a>get</a>('Lincoln');
    1.26  // id === 1</pre>
    1.27              <p>
     2.1 --- a/Speclet_022_IDB_API_Synchronous_APIs.html	Fri Mar 01 11:47:21 2013 -0800
     2.2 +++ b/Speclet_022_IDB_API_Synchronous_APIs.html	Fri Mar 01 11:53:29 2013 -0800
     2.3 @@ -936,11 +936,12 @@
     2.4                index could be maintained on the <em>name</em> property of objects
     2.5                in the <em>Contact</em> <a>object store</a>.
     2.6              </p>
     2.7 -            <pre class="example highlight">var db = indexedDBSync.open('AddressBook', 2, function(trans, oldVersion) {
     2.8 +            <pre class="example highlight">
     2.9 +var db = indexedDBSync.open('AddressBook', 2, function(trans, oldVersion) {
    2.10    if (oldVersion === 1) {
    2.11      trans.db.createObjectStore('Contact', {keyPath:'id', autoIncrement:true});
    2.12    }
    2.13 -  var store = vtx.objectStore('Contact');
    2.14 +  var store = trans.objectStore('Contact');
    2.15    store.createIndex('ContactName', 'name', {unique:false, multiEntry:false});
    2.16  });
    2.17  </pre>
    2.18 @@ -949,7 +950,8 @@
    2.19                property value 'Lincoln' can be retrieved using the
    2.20                <em>ContactName</em> <a>index</a>.
    2.21              </p>
    2.22 -            <pre class="example highlight">var index = store.<a>openIndex</a>('ContactName');
    2.23 +            <pre class="example highlight">
    2.24 +var index = store.<a>index</a>('ContactName');
    2.25  var id = index.<a>get</a>('Lincoln');
    2.26  // id === 1</pre>
    2.27              <p>