Results 61 - 80 of 125

IDBObjectStore.keyPath

If this property is null, the application must provide a key for each modification operation.
API Database IDBObjectStore IndexedDB keyPath Property Reference Storage storage

IDBObjectStore.openCursor()

To determine if the add operation has completed successfully, listen for the results’s success event.
API Database IDBObjectStore IndexedDB Method openCursor Reference storage Storage

IDBObjectStore.openKeyCursor()

To determine if the add operation has completed successfully, listen for the results’s success event.
API Database IDBObjectStore Method openKeyCursor Reference Référence storage Storage

IDBObjectStore.put()

If the record is successfully stored, then a success event is fired on the returned request object with the result set to the key for the stored record, and the transaction set to the transaction in which this object store is opened.
API Database IDBObjectStore IndexedDB Method put Reference storage Storage

IDBOpenDBRequest.onblocked

The IDBOpenDBRequest.onblocked event handler is the event handler for the blocked event. This event is triggered when the upgradeneeded should be triggered because of a version change but the database is still in use (that is, not closed) somewhere, even after the versionchange event was sent.
API Database IDBOpenDBRequest IndexedDB onblocked Property Reference Storage storage

IDBOpenDBRequest.onupgradeneeded

In the following example you can see the onupgradeneeded handler being used to update the database structure if a database with a higher version number is loaded. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBOpenDBRequest IndexedDB onupgradeneeded Property Reference Storage storage

IDBRequest

The request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the IDBRequest instance.
API Database IDBRequest IndexedDB Interface Reference storage Storage

IDBRequest.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 following error codes are returned under certain conditions:
API Database Error IDBRequest IndexedDB Property Reference Storage storage

IDBRequest.onerror

The following example requests a given record title, onsuccess gets the associated record from the IDBObjectStore (made available as objectStoreTitleRequest.result), updates one property of the record, and then puts the updated record back into the object store. Also included at the bottom is an onerror function that reports what the error was if the request fails. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBRequest IndexedDB onerror Property Reference Storage storage

IDBRequest.onsuccess

The following example requests a given record title, onsuccess gets the associated record from the IDBObjectStore (made available as objectStoreTitleRequest.result), updates one property of the record, and then puts the updated record back into the object store. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBRequest IndexedDB onsuccess Property Reference Storage storage

IDBRequest.source

An object representing the source of the request, such as an IDBIndex, IDBObjectStore or IDBCursor.
API Database IDBRequest IndexedDB Property Reference source Source storage Storage

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