Results 81 - 100 of 125

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

IDBVersionChangeEvent

The IDBVersionChangeEvent interface of the IndexedDB API indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function.
API Database DOM IDBVersionChangeEvent IndexedDB Interface JavaScript Reference storage Storage

IDBVersionChangeEvent.newVersion

In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. These events are fired via the custom IDBVersionChangeEvent interface. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBVersionChangeEvent IndexedDB newVersion Property Reference storage Storage

IDBVersionChangeEvent.oldVersion

In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. These events are fired via the custom IDBVersionChangeEvent interface. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBVersionChangeEvent IndexedDB oldVersion Property Reference storage Storage

IndexedDB API

IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs. This API uses indexes to enable high performance searches of this data. While DOM Storage is useful for storing smaller amounts of data, it is less useful for storing larger amounts of structured data. IndexedDB provides a solution. This is the main landing page for MDN's IndexedDB coverage — here we provide links to the full API reference and usage guides, browser support details, and some explanation of key concepts.
Advanced API Database IndexedDB Landing Reference storage Storage

Browser storage limits and eviction criteria

There are a number of web technologies that store data of one kind or another on the client-side (i.e. on your local disk.) The process by which the browser works out how much space to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between browsers. This article attempts to explain how this all works.
client-side Database eviction IndexedDB limit LRU storage Storage

Using IndexedDB

This tutorial walks you through using the asynchronous API of IndexedDB. If you are not familiar with IndexedDB, you should first read Basic Concepts About IndexedDB.
Advanced API Database Guide IndexedDB Storage storage Tutorial

Using the Data Store API

To explain the main functionality of Data Store, we have build two examples that work together (you can download these from Github using the code below, and experiment with them as you wish):
B2G Data Store API Database Firefox OS Guide Storage storage

DataStore

The DataStore interface of the Data Store API represents a retrieved set of data, and includes standard properties for accessing the store's name, owner, etc., methods for reading, modifying and syncing data, and the onchange event handler for reacting to changes to the data.
API Data Store API Database DataStore Interface Non-standard Reference Référence storage Storage

DataStoreChangeEvent

The DataStoreChangeEvent interface of the Data Store API represents the event related to a record changed in the data store, i.e. this is returned once a change is made and the change event is fired (see DataStore.onchange for the handler).
API Data Store Data Store API Database DataStoreChangeEvent Interface Non-standard Reference Référence Storage storage

DataStoreChangeEvent.id

The id read-only property of the DataStoreChangeEvent interface returns the identifier of the changed record in the data store. This must return null if the operation is cleared.
API Data Store Data Store API Database DataStoreChangeEvent id Property Reference Référence storage Storage

DataStoreChangeEvent.operation

The operation read-only property of the DataStoreChangeEvent interface returns the type of operation that represents the current change that has been made to the data store.
API Data Store Data Store API Database DataStoreChangeEvent operation Property Reference Référence Storage storage

DataStoreChangeEvent.owner

The owner read-only property of the DataStoreChangeEvent interface returns the manifest URL of the application that made the change to the data store.
API Data Store Data Store API Database DataStoreChangeEvent owner Property Reference Référence Storage storage