Baseline Widely available
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.
new IDBVersionChangeEvent(type)
new IDBVersionChangeEvent(type, options)
Parameters
type
A string with the name of the event. It is case-sensitive and browsers set it to versionchange
, success
, or blocked
.
options
Optional
An object that, in addition of the properties defined in Event()
, can have the following properties:
oldVersion
Optional
A number representing the previous version of the database. It defaults to 0
.
newVersion
Optional
An 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).
Specifications Browser compatibilityRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4