title: Uncaught TypeError: Type error in Chrome when using indexedDB
body: <p>I am trying to set up indexeddb storage for use in chrome.  But am getting an <code>Uncaught TypeError</code> when I try to set up a <code>READ_WRITE</code> transaction.  </p>
  
  <p>I have not been able to find good, up to date info on using webkitIDB.  So I'm basically flying blind here.  Any ideas what I've done wrong?  Are there good tuts out there on this that I missed?</p>
  
  <p>Setup:</p>
  
  <pre><code>function OfflineStorage() {
    this.saveJSONString = __bind(this.saveJSONString, this);
    var request,
      _this = this;
    this.dbkeyRange = window.webkitIDBKeyRange;
    this.dbTransaction = window.webkitIDBTransaction;
    this.db = window.webkitIndexedDB;
    request = this.db.open("lucidFrog");
    request.onsuccess = function(e) {
      _this.db = e.target.result;
      return _this.setupDB(); //setupDB() ensures the objectStores have been created.
    };
  }    
  </code></pre>
  
  <p>Save Function:</p>
  
  <pre><code>OfflineStorage.prototype.saveJSONString = function(objectStore, json_string, obj_id) {
    var request, store, transaction;
  
    //PROBLEM AREA, gives "Uncaught TypeError: Type error"
    transaction = this.db.transaction([objectStore], this.dbTransaction.READ_WRITE, 0);
    ////////////////////
  
    store = transaction.objectStore(objectStore);
    request = store.put({
      "json": json_string,
      "id": obj_id
    });
    request.onsuccess = function(e) {
      return console.log("YYYYYYEEEEEAAAAAHHHHHH!!!");
    };
  };
  </code></pre>
  
  <p>The requested <code>objectStore</code> has been created, and confirmed that <code>this.dbTransaction</code> is defined.</p>