Nos bénévoles n'ont pas encore traduit cet article en Français. Inscrivez-vous et aidez-nous à réaliser cette tâche !
Vous pouvez également lire cet article en English (US).

Warning: The latest specification does not include this interface anymore as 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

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support12 — 23 webkit ? No No No No
setVersion No No No No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? No ? No No No No
setVersion No No No No No No No

Étiquettes et contributeurs liés au document

Contributeurs à cette page : fscholz, inexorabletash, chrisdavidmills, teoli, nehasharma, grendel, jswisher
Dernière mise à jour par : fscholz,