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.
IDBVersionChangeRequest setVersion ([TreatNullAs=EmptyString] in DOMString version);
TBD
IDBVersionChangeRequest
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | No | No | No | No | No | No |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | No | No | No | No | No | No | No |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeRequest/setVersion