Oh yes, it works great. What a nice twist! I learned IndexedDB for one year (literally), still not get it.
On Thu, May 16, 2013 at 12:03 PM, Jonas Sicking <[email protected]> wrote: > On Wed, May 15, 2013 at 7:45 PM, Kyaw Tun <[email protected]> wrote: > > When ConstraintError occur in 'steps for storing a record into an object > > store', it said 'Abort this algorithm without taking any further steps.' > I > > assume the transaction can be still be used, except that this request > fail. > > However both Chrome and Firefox implementation abort transaction. Is that > > correct behavior? > > The steps run by, for example, objectStore.add is actually "steps for > asynchronously executing a request". > > This is the algorithm that eventually ends up running the "steps for > storing a record into an object store". > > The in step 7 of the "steps for asynchronously executing a request", > if the database operation failed we run the "fire an error event" > algorithm. > > When this algorithm runs, unless the error Event is cancelled through > Event.preventDefault(), the transaction is aborted. > > So the transaction isn't always aborted. But it is aborted if the > error goes unhandled which sounds like is the case for you. > > / Jonas >
