← Back to IndexedDB domain
IndexedDB.requestDatabase
Requests database with given name in given frame.
Domain: IndexedDB
experimental
Parameters
| Name | Type | Description |
securityOrigin (optional) | string | At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
Security origin. |
storageKey (optional) | string | Storage key. |
storageBucket (optional) | Storage.StorageBucket | Storage bucket. If not specified, it uses the default bucket. |
databaseName | string | Database name. |
Returns
| Name | Type | Description |
databaseWithObjectStores | DatabaseWithObjectStores | Database with an array of object stores. |
Example Request
{
"id": 1,
"method": "IndexedDB.requestDatabase",
"params": {
"databaseName": "databaseName-value"
}
}
Example Response
{
"id": 1,
"result": {
"databaseWithObjectStores": "databaseWithObjectStores-value"
}
}
Usage in Node.js
const result = await send('IndexedDB.requestDatabase', {"databaseName": "databaseName-value"});
console.log(result);
// {"databaseWithObjectStores": "databaseWithObjectStores-value"}