Results 1 - 10 of 10

IDBTransaction

Note that as of Firefox 40, IndexedDB transactions have relaxed durability guarantees to increase performance (see bug 1112702.) Previously in a readwrite transaction IDBTransaction.oncomplete was fired only when all data was guaranteed to have been flushed to disk. In Firefox 40+ the complete event is fired after the OS has been told to write the data but potentially before that data has actually been flushed to disk. The complete event may thus be delivered quicker than before, however, there exists a small chance that the entire transaction will be lost if the OS crashes or there is a loss of system power before the data is flushed to disk. Since such catastrophic events are rare most consumers should not need to concern themselves further.
API Database IDBTransaction IndexedDB Interface MakeBrowserAgnostic Reference storage Storage

IDBTransaction.abort()

All pending IDBRequest objects created during this transaction have their IDBRequest.error attribute set to AbortError.
abort API Database IDBTransaction IndexedDB Method Reference storage Storage

IDBTransaction.error

A DOMError containing the relevant error. In Chrome 48 and later this property returns a DOMException because DOMError has been removed from the DOM standard. The exact error is one of serveral possibilities. It can be a reference to the same error as the request object that raised it, or a transaction failure (for example QuotaExceededError or UnknownError).
API Database Error IDBTransaction IndexedDB Property Reference Storage storage

IDBTransaction.mode

An IDBTransactionMode object defining the mode for isolating access to data in the current object stores:
API Database IDBTransaction IndexedDB mode Property Reference Storage storage

IDBTransaction.objectStore()

Every call to this method on the same transaction object, with the same name, returns the same IDBObjectStore instance. If this method is called on a different transaction object, a different IDBObjectStore instance is returned.
API Database IDBTransaction IndexedDB Method objectStore Reference storage Storage

IDBTransaction.onabort

In the following code snippet, we open a read/write transaction on our database and add some data to an object store. Note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure. Note the transaction.onabort = function(event) { }; block, reporting when the transaction has been aborted. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBTransaction IndexedDB onabort Property Reference Storage storage

IDBTransaction.oncomplete

The oncomplete event handler of the IDBTransaction interface handles the complete event, fired when the transaction successfully completes.
API Database IDBTransaction IndexedDB oncomplete Property Reference Storage storage

IDBTransaction.onerror

In the following code snippet, we open a read/write transaction on our database and add some data to an object store. Note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure. Note the transaction.onerror = function(event) { }; block, making use of transaction.error to help in reporting what went wrong when the transaction was unsuccessful. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBTransaction IndexedDB onerror Property Reference Storage storage