This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.



The mode for isolating access to data in the object stores that are in the scope of the transaction. For possible values, see Return Value, below. The default value is readonly.

Property of apis/indexeddb/IDBTransactionapis/indexeddb/IDBTransaction


Note: This property is read-only.

var result = element.mode;

Return Value

Returns an object of type StringString

  • readonly (0) - Allows data to be read but not changed.
  • readwrite (1) - Allows reading and writing of data in existing data stores to be changed.
  • versionchange (2) - Allows any operation to be performed, including ones that delete and create object stores and indexes. This mode is for updating the version number of transactions that were started using the setVersion() method of IDBDatabase objects. Transactions of this mode cannot run concurrently with other transactions.


Standards information