Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The IDBVersionChangeEvent() constructor creates a new IDBVersionChangeEvent object, which is used to represent when a version of the database has changed, as a result of the onupgradeneeded event handler.
A string with the name of the event. It is case-sensitive and browsers set it to versionchange, success, or blocked.
options OptionalAn object that, in addition of the properties defined in Event(), can have the following properties:
oldVersion OptionalA number representing the previous version of the database. It defaults to 0.
newVersion OptionalAn unsigned long representing the new version of the database, or null if the database is being deleted. It defaults is null.
A new IDBVersionChangeEvent object.
For a full working example, see our To-do Notifications app (view example live).
| Indexed Database API 3.0 # dom-idbversionchangeevent-idbversionchangeevent |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Aug 6, 2024 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.