Re: [IndexedDB] IDBDAtabase.transaction clarification

2012-02-23 Thread Jonas Sicking
req = indexedDB.open("mydb", 5); req.onupgradeneeded = function(e) { assert(e.target === req); var thetransaction = req.transaction; var thedb = req.result; doStuffWith(thetransaction, thedb); } req.onsuccess = function(e) { assert(e.target === req); assert(req.transaction === null);

Re: [IndexedDB] IDBDAtabase.transaction clarification

2012-02-23 Thread João Eiras
IDBDatabase.transaction accepts either an array of strings or string as first argument, which are the name of the object stores. What should be used for the very first transaction of an empty database with no object stores ? Empty array ? When a database is created a VERSION_CHANGE transaction

Re: [IndexedDB] IDBDAtabase.transaction clarification

2012-02-23 Thread Jonas Sicking
On Thu, Feb 23, 2012 at 9:27 PM, João Eiras wrote: > > Hi. > > It seems IDBDatabase.transaction in the working draft is poorly defined. > > IDBDatabase.transaction, according to the transaction creation algorithm, > have a null callback, but then IDBDatabase.createObjectStore and > IDBDatabase.del

[IndexedDB] IDBDAtabase.transaction clarification

2012-02-23 Thread João Eiras
Hi. It seems IDBDatabase.transaction in the working draft is poorly defined. IDBDatabase.transaction, according to the transaction creation algorithm, have a null callback, but then IDBDatabase.createObjectStore and IDBDatabase.deleteObjectStore say they should fail if not called from the trans