Chartbreaker
    Preparing search index...

    Interface IDBOpenDBRequest

    The IDBOpenDBRequest interface of the IndexedDB API provides access to the results of requests to open or delete databases (performed using IDBFactory.open and IDBFactory.deleteDatabase), using specific event handler attributes.

    MDN Reference

    interface IDBOpenDBRequest {
        error: DOMException | null;
        onblocked:
            | ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any)
            | null;
        onerror: ((this: IDBRequest<IDBDatabase>, ev: Event) => any) | null;
        onsuccess: ((this: IDBRequest<IDBDatabase>, ev: Event) => any) | null;
        onupgradeneeded:
            | ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any)
            | null;
        readyState: IDBRequestReadyState;
        result: IDBDatabase;
        source: IDBObjectStore | IDBIndex | IDBCursor;
        transaction: IDBTransaction | null;
        addEventListener<K extends keyof IDBOpenDBRequestEventMap>(
            type: K,
            listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | AddEventListenerOptions,
        ): void;
        dispatchEvent(event: Event): boolean;
        removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(
            type: K,
            listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any,
            options?: boolean | EventListenerOptions,
        ): void;
        removeEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | EventListenerOptions,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    error: DOMException | null

    The error read-only property of the IDBRequest interface returns the error in the event of an unsuccessful request.

    MDN Reference

    onblocked: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null
    onerror: ((this: IDBRequest<IDBDatabase>, ev: Event) => any) | null
    onsuccess: ((this: IDBRequest<IDBDatabase>, ev: Event) => any) | null
    onupgradeneeded:
        | ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any)
        | null

    The readyState read-only property of the IDBRequest interface returns the state of the request.

    MDN Reference

    result: IDBDatabase

    The result read-only property of the IDBRequest interface returns the result of the request.

    MDN Reference

    The source read-only property of the IDBRequest interface returns the source of the request, such as an Index or an object store. If no source exists (such as when calling IDBFactory.open), it returns null.

    MDN Reference

    transaction: IDBTransaction | null

    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.

    MDN Reference

    Methods

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

      MDN Reference

      Parameters

      Returns boolean