Skip to content

openDatabase

Unofficial

Open or create a WebSQL database.

Signature:

function openDatabase(name: string, version: string, displayName: string, estimatedSize: number, creationCallback: ((database: Database) => void) | undefined): Database

Parameters:

ParameterTypeDescription
namestringThe name of the database.
versionstringThe version of the database.
displayNamestringThe display name of the database.
estimatedSizenumberThe estimated size of the database in bytes.
creationCallback((database: Database) => void) | undefinedOptional callback invoked when the database is created.

Returns: Database — The opened or created database.