Interface IDBFactory
interface IDBFactory {
cmp(first: any, second: any): number;
databases(): Promise<IDBDatabaseInfo[]>;
deleteDatabase(name: string): IDBOpenDBRequest;
open(name: string, version?: number): IDBOpenDBRequest;
}
cmp(first: any, second: any): number;
databases(): Promise<IDBDatabaseInfo[]>;
deleteDatabase(name: string): IDBOpenDBRequest;
open(name: string, version?: number): IDBOpenDBRequest;
}
Index
Methods
Methods
cmp
databases
- databases(): Promise<IDBDatabaseInfo[]>
Returns Promise<IDBDatabaseInfo[]>
deleteDatabase
- delete
Database (name): IDBOpenDBRequest Attempts to delete the named database. If the database already exists and there are open connections that don't close in response to a versionchange event, the request will be blocked until all they close. If the request is successful request's result will be null.
Parameters
- name: string
Returns IDBOpenDBRequest
open
- open(name, version?): IDBOpenDBRequest
Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection.
Parameters
- name: string
Optional
version: number
Returns IDBOpenDBRequest
In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.)
MDN Reference