transaction property
IDBTransaction?
get
transaction
The transaction
read-only property of the IDBRequest
interface returns the transaction for the request, that is, the
transaction the
request is being made inside.
This property can be null
for requests not made within transactions,
such as for requests returned from IDBFactory.open — in this case
you're just connecting to a database, so there is no transaction to
return. If a
version upgrade is needed when opening a database then during the
IDBOpenDBRequest.upgradeneeded_event
event handler the
transaction
property will be an
IDBTransaction with IDBTransaction.mode equal
to "versionchange"
, and can be used to access existing object stores and
indexes, or abort the upgrade. Following the upgrade, the
transaction
property will again be null
.
Implementation
external IDBTransaction? get transaction;