Closed
Description
Forked off from #34 and previous mentioned on the old wiki, but formalizing it a bit:
- Introduce a new transaction mode, "writeonly"
- If a transaction's mode is "writeonly":
- any IDBObjectStore or IDBIndex operation other than
put()
oradd()
will throwNotSupportedError
put()
andadd()
return null (return type changed toIDBRequest?
)success
/error
events not fired (i.e. don't bubble up to the transaction/connection)- a failed operation (usually, conflicting
add()
) still causes the transaction to abort complete
/abort
events are still fired against the transaction
- any IDBObjectStore or IDBIndex operation other than
There is probably additional spec text required for clarity, but effectively since the transaction can no longer become active after the cleanup transactions steps run when the task ends, the transaction can attempt to commit immediately; it needs to wait until all of the put()
s/add()
s finish. The transaction lifetime steps are still a bit wishy-washy; I didn't completely revise those as part of the big 2.0 rework of the spec.