I am trying to do simple application with Indexed DB. I want to store multiple items in one objectStore. Is it possible? I tried something like that, but it does not work:
itemsDB.indexedDB.addTodo = function(Name, Desp) {
var db = itemsDB.indexedDB.db;
var trans = db.transaction(['items'], IDBTransaction.READ_WRITE);
var store = trans.objectStore("items");
var data = {
"name": Name,
"description": Desp,
};
var request = store.put(data);
}
I have used sample from http://www.html5rocks.com/en/tutorials/indexeddb/todo/