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: null | DOMException;
        onblocked:
            | null
            | ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any);
        onerror: null | ((this: IDBRequest<IDBDatabase>, ev: Event) => any);
        onsuccess: null | ((this: IDBRequest<IDBDatabase>, ev: Event) => any);
        onupgradeneeded:
            | null
            | ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any);
        readyState: IDBRequestReadyState;
        result: IDBDatabase;
        source: IDBObjectStore | IDBIndex | IDBCursor;
        transaction: null | IDBTransaction;
        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: null | DOMException

    The error read-only property of the request.

    MDN Reference

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

    The readyState read-only property of the Every request starts in the pending state.

    MDN Reference

    result: IDBDatabase

    The result read-only property of the any - InvalidStateError DOMException - : Thrown when attempting to access the property if the request is not completed, and therefore the result is not available.

    MDN Reference

    source: IDBObjectStore | IDBIndex | IDBCursor

    The source read-only property of the Index or an object store.

    MDN Reference

    transaction: null | IDBTransaction

    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.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean