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
- IDBRequest<IDBDatabase>
- IDBOpenDBRequest (View Summary)
Index
Properties
Readonlyerror
The error read-only property of the request.
onblocked
onerror
onsuccess
onupgradeneeded
ReadonlyreadyState
The readyState read-only property of the Every request starts in the pending state.
Readonlyresult
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.
Readonlysource
The source read-only property of the Index or an object store.
Readonlytransaction
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.
Methods
addEventListener
- addEventListener<K extends keyof IDBOpenDBRequestEventMap>(
type: K,
listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): voidThe
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.Type Parameters
- K extends keyof IDBOpenDBRequestEventMap
Parameters
- type: K
- listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any
Optionaloptions: boolean | AddEventListenerOptions
Returns void
- addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): voidThe
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optionaloptions: boolean | AddEventListenerOptions
Returns void
dispatchEvent
The
dispatchEvent()method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.Parameters
- event: Event
Returns boolean
removeEventListener
- removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(
type: K,
listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): voidThe
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.Type Parameters
- K extends keyof IDBOpenDBRequestEventMap
Parameters
- type: K
- listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any
Optionaloptions: boolean | EventListenerOptions
Returns void
- removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): voidThe
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optionaloptions: boolean | EventListenerOptions
Returns void
The
IDBOpenDBRequestinterface 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