Skip to content

Add IDBDatabase.onversionchange #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15129,6 +15129,7 @@ raw/IDBDatabase[JC] def name: String
raw/IDBDatabase[JC] def objectStoreNames: DOMStringList
raw/IDBDatabase[JC] var onabort: js.Function1[Event, _]
raw/IDBDatabase[JC] var onerror: js.Function1[Event, _]
raw/IDBDatabase[JC] var onversionchange: js.Function1[IDBVersionChangeEvent, _]
raw/IDBDatabase[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
raw/IDBDatabase[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit
raw/IDBDatabase[JC] def transaction(storeNames: js.Any, mode: String?): IDBTransaction
Expand Down
1 change: 1 addition & 0 deletions api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15129,6 +15129,7 @@ raw/IDBDatabase[JC] def name: String
raw/IDBDatabase[JC] def objectStoreNames: DOMStringList
raw/IDBDatabase[JC] var onabort: js.Function1[Event, _]
raw/IDBDatabase[JC] var onerror: js.Function1[Event, _]
raw/IDBDatabase[JC] var onversionchange: js.Function1[IDBVersionChangeEvent, _]
raw/IDBDatabase[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
raw/IDBDatabase[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit
raw/IDBDatabase[JC] def transaction(storeNames: js.Any, mode: String?): IDBTransaction
Expand Down
8 changes: 8 additions & 0 deletions src/main/scala/org/scalajs/dom/raw/Idb.scala
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,14 @@ class IDBDatabase extends EventTarget {
*/
var onabort: js.Function1[Event, _] = js.native

/**
* The onversionchange event handler of the IDBDatabase interface handles the versionchange
* event, fired when a database structure change (IDBOpenDBRequest.onupgradeneeded event or
* IDBFactory.deleteDatabase) was requested elsewhere (most probably in another window/tab
* on the same computer).
*/
var onversionchange: js.Function1[IDBVersionChangeEvent, _] = js.native

/**
* The method takes the name of the store as well as a parameter object. The parameter
* object lets you define important optional properties. You can use the property to
Expand Down