interface IDBRequest
implements EventTarget
import { type IDBRequest } from "https://deno.land/x/evt@v2.4.17/lib/types/lib.dom.ts";
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.
Properties
readonly
error: DOMException | nullWhen a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a "InvalidStateError" DOMException if the request is still pending.
readonly
result: TWhen a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending.
Methods
addEventListener<K extends keyof IDBRequestEventMap>(): void
type: K,
listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof IDBRequestEventMap>(): void
type: K,
listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any,
options?: boolean | EventListenerOptions,