interface dom.IDBTransaction
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.4.16/lib/index.ts";
const { IDBTransaction } = dom;
Properties
readonly
db: IDBDatabaseReturns the transaction's connection.
readonly
error: DOMExceptionIf the transaction was aborted, returns the error (a DOMException) providing the reason.
readonly
mode: IDBTransactionModeReturns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction.
readonly
objectStoreNames: DOMStringListReturns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database.
onabort: ((this: IDBTransaction, ev: Event) => any) | null
oncomplete: ((this: IDBTransaction, ev: Event) => any) | null
onerror: ((this: IDBTransaction, ev: Event) => any) | null
Methods
Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted.
objectStore(name: string): IDBObjectStore
Returns an IDBObjectStore in the transaction's scope.
addEventListener<K extends keyof IDBTransactionEventMap>(): void
type: K,
listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof IDBTransactionEventMap>(): void
type: K,
listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any,
options?: boolean | EventListenerOptions,