[w3c/IndexedDB] Add a new event `onbeforecommit` on the interface IDBTransaction (#314)

By adding a `onbeforecommit` event, developers can suppress the bad transaction that make the db in an inconsistent state to be committed.

e.g.

```ts
transaction.onbeforecommit = (event) => {
   // when the transaction enter the `onbeforecommit` event, it becomes readonly. it should be enough for consistency check
   if (dbIsConsistent(transaction)) { event.commit() }
   else { event.abort() } // db is inconsistent if we commit this transaction
}
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/314

Received on Wednesday, 18 December 2019 10:02:09 UTC