IDBVersionChangeRequest.setVersion()

The IDBVersionChangeRequest.setVersion method updates the version of the database, returning immediately and running a versionchange transaction on the connected database in a separate thread.

For older WebKit browsers, call this method before creating or deleting an object store.

Warning: The latest draft of the specification has dropped this method. Some not up-to-date browsers still implement this method. The new way is to define the version in the IDBDatabase.open() method and create and delete object stores in the onupgradeneeded event handler associated with the returned request.

SyntaxEdit

IDBVersionChangeRequest setVersion ([TreatNullAs=EmptyString] in DOMString version);

ExampleEdit

TBD

ParametersEdit

version
The version to store in the database.

ReturnsEdit

IDBVersionChangeRequest
The request to change the version of a database.

Browser compatibilityEdit

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support Not supported Not supported Not supported Not supported Not supported

See alsoEdit

Document Tags and Contributors

 Contributors to this page: fscholz, chrisdavidmills
 Last updated by: fscholz,