Warning: The latest specification does not include this interface anymore as the
The new way to do it is to use the
IDBDatabase.setVersion()
method has been removed. See the compatibility table for version details.The new way to do it is to use the
IDBOpenDBRequest
interface which has now the onblocked
handler and the newly needed onupgradeneeded
one.The IDBVersionChangeRequest
interface the IndexedDB API represents a request to change the version of a database. It is used only by the setVersion()
method of IDBDatabase
.
Methods
Inherits from: IDBRequest
IDBVersionChangeRequest.setVersion
- Updates the version of the database. Returns immediately and runs a
versionchange
transaction on the connected database in a separate thread.
Attributes
Attribute | Type | Description |
---|---|---|
onblocked |
Function |
The event handler for the blocked event. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
IDBVersionChangeRequest | Chrome
No support
12 — 23
| Edge ? | Firefox No support No | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android No support No | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
setVersion | Chrome No support No | Edge No support No | Firefox No support No | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android No support No | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
Legend
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Non-standard. Expect poor cross-browser support.
- Non-standard. Expect poor cross-browser support.
- Deprecated. Not for use in new websites.
- Deprecated. Not for use in new websites.
- Requires a vendor prefix or different name for use.
- Requires a vendor prefix or different name for use.