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.

MDN Reference

Type Parameters

  • T = any

Hierarchy

  • EventTarget
    • IDBRequest

Properties

error: null | DOMException

When 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.

MDN Reference

onerror: null | ((this, ev) => any)

Type declaration

    • (this, ev): any
    • Parameters

      Returns any

onsuccess: null | ((this, ev) => any)

Type declaration

    • (this, ev): any
    • Parameters

      Returns any

Returns "pending" until a request is complete, then returns "done".

MDN Reference

result: T

When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending.

MDN Reference

Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request.

MDN Reference

transaction: null | IDBTransaction

Returns the IDBTransaction the request was made within. If this as an open request, then it returns an upgrade transaction while it is running, or null otherwise.

MDN Reference

Methods

  • Type Parameters

    Parameters

    Returns void

  • Parameters

    Returns void

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    • event: Event

    Returns boolean

  • Type Parameters

    Parameters

    Returns void

  • Parameters

    Returns void

Generated using TypeDoc