This method is used in multi app mode to create a database object that can be shared by applications, either using the existing database or creating a new one, i.e. this method will open a database if it already exists; if the database does not exist the method will create it first.
The newly constructed database object represents the database with the given name. The
method signature and behavior is the same as for the openDatabase
. This method extends the
window
object.
This method is deprecated. It has been replaced by the openDatabase method with appropiate sharing settings.
Name | Description | Type |
---|---|---|
creationCallback | A callback method to be invoked if the database has not yet been created. It can, for
example, contain table creation SQL statements. The callback, if provided, is invoked
with the database having the empty string as its version regardless of the database
version given by the version parameter. |
DatabaseCallback |
displayName | A textual description of the database. | String |
estimatedSize | An estimated size, in bytes, of the data that will be stored in the database. | Unsigned Long |
name | The name (case-sensitive) of the shared database to open or create. | String |
version | The database version. It can be an empty string. The database version number is required in order to open the database and it needs to match the database version that the client uses. A database can only have one version at a time. | String |