The attribute getter returns the previous version of the database.

    The newVersion attribute getter returns the new version of the database, or null if the database is being deleted. See the steps to .

    Events are constructed as defined in DOM §2.5 Constructing events.

    1. Let event be the result of using .

    2. Set event’s [type](https://dom.spec.whatwg.org/#dom-event-type) attribute to e.

    3. Set event’s [newVersion](#dom-idbversionchangeevent-newversion) attribute to newVersion.

    4. Dispatch event at target with legacyOutputDidListenersThrowFlag.

    5. The return value of this algorithm is not always used.