requestDatabase method
Requests database with given name in given frame.
securityOrigin
At least and at most one of securityOrigin, storageKey must be specified.
Security origin.
storageKey
Storage key.
databaseName
Database name.
Returns: Database with an array of object stores.
Implementation
Future<DatabaseWithObjectStores> requestDatabase(String databaseName,
{String? securityOrigin, String? storageKey}) async {
var result = await _client.send('IndexedDB.requestDatabase', {
'databaseName': databaseName,
if (securityOrigin != null) 'securityOrigin': securityOrigin,
if (storageKey != null) 'storageKey': storageKey,
});
return DatabaseWithObjectStores.fromJson(
result['databaseWithObjectStores'] as Map<String, dynamic>);
}