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.
警告:
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
The version to store in the database.
IDBVersionChangeRequest
The request to change the version of a database.
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
setVersion
弃用
非标
|
Chrome No | Edge No | Firefox No | IE No | Opera No | Safari No | WebView Android No | Chrome Android No | Firefox Android No | Opera Android No | Safari iOS No | Samsung Internet Android No |
不支持
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
IDBVersionChangeRequest
setVersion()
IDBCursor
IDBCursorSync
IDBCursorWithValue
IDBDatabase
IDBDatabaseException
IDBDatabaseSync
IDBEnvironment
IDBEnvironmentSync
IDBFactory
IDBFactorySync
IDBIndex
IDBIndexSync
IDBKeyRange
IDBObjectStore
IDBObjectStoreSync
IDBOpenDBRequest
IDBRequest
IDBTransaction
IDBTransactionSync
IDBVersionChangeEvent