diff --git a/api-reports/2_12.txt b/api-reports/2_12.txt index 866b2dd7a..8cb77e199 100644 --- a/api-reports/2_12.txt +++ b/api-reports/2_12.txt @@ -1822,7 +1822,7 @@ EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Fu EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit EventSource[JC] def close(): Unit EventSource[JC] def dispatchEvent(evt: Event): Boolean -EventSource[JC] var onerror: js.Function1[Event, _] +EventSource[JC] var onerror: js.Function1[ErrorEvent, _] EventSource[JC] var onmessage: js.Function1[MessageEvent, _] EventSource[JC] var onopen: js.Function1[Event, _] EventSource[JC] def readyState: Int @@ -3184,7 +3184,7 @@ HTMLBodyElement[JC] var ondrop: js.Function1[DragEvent, _] HTMLBodyElement[JC] var ondurationchange: js.Function1[Event, _] HTMLBodyElement[JC] var onemptied: js.Function1[Event, _] HTMLBodyElement[JC] var onended: js.Function1[Event, _] -HTMLBodyElement[JC] var onerror: js.Function1[Event, _] +HTMLBodyElement[JC] var onerror: js.Function1[ErrorEvent, _] HTMLBodyElement[JC] var onfocus: js.Function1[FocusEvent, _] HTMLBodyElement[JC] var onfocusin: js.Function1[FocusEvent, _] HTMLBodyElement[JC] var onfocusout: js.Function1[FocusEvent, _] @@ -4413,7 +4413,7 @@ HTMLDocument[JC] var ondrop: js.Function1[DragEvent, _] HTMLDocument[JC] var ondurationchange: js.Function1[Event, _] HTMLDocument[JC] var onemptied: js.Function1[Event, _] HTMLDocument[JC] var onended: js.Function1[Event, _] -HTMLDocument[JC] var onerror: js.Function1[Event, _] +HTMLDocument[JC] var onerror: js.Function1[ErrorEvent, _] HTMLDocument[JC] var onfocus: js.Function1[FocusEvent, _] HTMLDocument[JC] var onfocusin: js.Function1[FocusEvent, _] HTMLDocument[JC] var onfocusout: js.Function1[FocusEvent, _] @@ -14014,14 +14014,15 @@ IDBDatabase[JC] def dispatchEvent(evt: Event): Boolean IDBDatabase[JC] def name: String IDBDatabase[JC] def objectStoreNames: DOMStringList IDBDatabase[JC] var onabort: js.Function1[Event, _] -IDBDatabase[JC] var onerror: js.Function1[Event, _] +IDBDatabase[JC] var onclose: js.Function1[CloseEvent, _] +IDBDatabase[JC] var onerror: js.Function1[ErrorEvent, _] IDBDatabase[JC] var onversionchange: js.Function1[IDBVersionChangeEvent, _] IDBDatabase[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit IDBDatabase[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit IDBDatabase[JC] def transaction(storeNames: String | js.Array[String], mode: js.UndefOr[IDBTransactionMode]?, options: js.UndefOr[IDBTransactionOptions]?): IDBTransaction -IDBDatabase[JC] def version: Int +IDBDatabase[JC] def version: Double IDBDatabaseInfo[JT] val name: String -IDBDatabaseInfo[JT] val version: Int +IDBDatabaseInfo[JT] val version: Double IDBEnvironment[JT] def indexedDB: IDBFactory (@deprecated in 1.2.0) IDBEvent[JC] def bubbles: Boolean IDBEvent[JC] def cancelBubble: Boolean @@ -14046,7 +14047,7 @@ IDBEventTarget[JC] def result: A IDBFactory[JC] def cmp(first: IDBValue, second: IDBValue): Int IDBFactory[JC] def databases(): js.Promise[js.Array[IDBDatabaseInfo]] IDBFactory[JC] def deleteDatabase(name: String): IDBOpenDBRequest[Unit] -IDBFactory[JC] def open(name: String, version: Int?): IDBOpenDBRequest[IDBDatabase] +IDBFactory[JC] def open(name: String, version: Double?): IDBOpenDBRequest[IDBDatabase] IDBIndex[JC] def count(query: IDBKey | IDBKeyRange?): IDBRequest[S, Double] IDBIndex[JC] def get(key: IDBKey | IDBKeyRange): IDBRequest[S, IDBValue] IDBIndex[JC] def getAll(query: js.UndefOr[IDBKeyRange | IDBKey]?, count: js.UndefOr[Double]?): IDBRequest[S, js.Array[IDBValue]] @@ -14090,7 +14091,7 @@ IDBOpenDBRequest[JC] def addEventListener[T <: Event](`type`: String, listener: IDBOpenDBRequest[JC] def dispatchEvent(evt: Event): Boolean IDBOpenDBRequest[JC] def error: DOMException IDBOpenDBRequest[JC] var onblocked: js.Function1[IDBVersionChangeEvent, _] -IDBOpenDBRequest[JC] var onerror: js.Function1[Event, _] +IDBOpenDBRequest[JC] var onerror: js.Function1[ErrorEvent, _] IDBOpenDBRequest[JC] var onsuccess: js.Function1[IDBEvent[A], _] IDBOpenDBRequest[JC] var onupgradeneeded: js.Function1[IDBVersionChangeEvent, _] IDBOpenDBRequest[JC] def readyState: String @@ -14103,7 +14104,7 @@ IDBRequest[JC] def addEventListener[T <: Event](`type`: String, listener: js.Fun IDBRequest[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit IDBRequest[JC] def dispatchEvent(evt: Event): Boolean IDBRequest[JC] def error: DOMException -IDBRequest[JC] var onerror: js.Function1[Event, _] +IDBRequest[JC] var onerror: js.Function1[ErrorEvent, _] IDBRequest[JC] var onsuccess: js.Function1[IDBEvent[A], _] IDBRequest[JC] def readyState: String IDBRequest[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit @@ -14130,7 +14131,7 @@ IDBTransaction[JC] def mode: IDBTransactionMode IDBTransaction[JC] def objectStore(name: String): IDBObjectStore IDBTransaction[JC] var onabort: js.Function1[Event, _] IDBTransaction[JC] var oncomplete: js.Function1[Event, _] -IDBTransaction[JC] var onerror: js.Function1[Event, _] +IDBTransaction[JC] var onerror: js.Function1[ErrorEvent, _] IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit IDBTransactionDurability[JT] @@ -14149,8 +14150,8 @@ IDBVersionChangeEvent[JC] def currentTarget: EventTarget IDBVersionChangeEvent[JC] def defaultPrevented: Boolean IDBVersionChangeEvent[JC] def eventPhase: Int IDBVersionChangeEvent[JC] def isTrusted: Boolean -IDBVersionChangeEvent[JC] def newVersion: Integer -IDBVersionChangeEvent[JC] def oldVersion: Int +IDBVersionChangeEvent[JC] def newVersion: java.lang.Double +IDBVersionChangeEvent[JC] def oldVersion: Double IDBVersionChangeEvent[JC] def preventDefault(): Unit IDBVersionChangeEvent[JC] def stopImmediatePropagation(): Unit IDBVersionChangeEvent[JC] def stopPropagation(): Unit @@ -14158,11 +14159,13 @@ IDBVersionChangeEvent[JC] def target: EventTarget IDBVersionChangeEvent[JC] override def target: IDBEventTarget[A] IDBVersionChangeEvent[JC] def timeStamp: Double IDBVersionChangeEvent[JC] def `type`: String +IDBVersionChangeEvent[SO] def newVersionOption: Option[Double] +IDBVersionChangeEvent.Ops[SC] def newVersionOption: Option[Double] IDBVersionChangeEventInit[JT] var bubbles: js.UndefOr[Boolean] IDBVersionChangeEventInit[JT] var cancelable: js.UndefOr[Boolean] IDBVersionChangeEventInit[JT] var composed: js.UndefOr[Boolean] -IDBVersionChangeEventInit[JT] var newVersion: js.UndefOr[Integer] -IDBVersionChangeEventInit[JT] var oldVersion: js.UndefOr[Int] +IDBVersionChangeEventInit[JT] var newVersion: js.UndefOr[java.lang.Double] +IDBVersionChangeEventInit[JT] var oldVersion: js.UndefOr[Double] IDBVersionChangeEventInit[JT] var scoped: js.UndefOr[Boolean] ImageBitmap[JT] def close(): Unit ImageBitmap[JT] def height: Double @@ -15169,8 +15172,8 @@ Notification[JC] def dispatchEvent(evt: Event): Boolean Notification[JC] val icon: String Notification[JC] val lang: String Notification[JC] val noscreen: Boolean -Notification[JC] var onclick: js.Function0[Any] -Notification[JC] var onerror: js.Function0[Any] +Notification[JC] var onclick: js.Function1[Event, Any] +Notification[JC] var onerror: js.Function1[ErrorEvent, Any] Notification[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit Notification[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit Notification[JC] val renotify: Boolean @@ -15186,15 +15189,15 @@ NotificationOptions[JT] var dir: js.UndefOr[String] NotificationOptions[JT] var icon: js.UndefOr[String] NotificationOptions[JT] var lang: js.UndefOr[String] NotificationOptions[JT] var noscreen: js.UndefOr[Boolean] -NotificationOptions[JT] var onclick: js.UndefOr[js.Function0[Any]] -NotificationOptions[JT] var onerror: js.UndefOr[js.Function0[Any]] +NotificationOptions[JT] var onclick: js.UndefOr[js.Function1[Event, Any]] +NotificationOptions[JT] var onerror: js.UndefOr[js.Function1[ErrorEvent, Any]] NotificationOptions[JT] var renotify: js.UndefOr[Boolean] NotificationOptions[JT] var silent: js.UndefOr[Boolean] NotificationOptions[JT] var sound: js.UndefOr[String] NotificationOptions[JT] var sticky: js.UndefOr[Boolean] NotificationOptions[JT] var tag: js.UndefOr[String] NotificationOptions[JT] var vibrate: js.UndefOr[js.Array[Double]] -NotificationOptions[SO] def apply(body: js.UndefOr[String]?, dir: js.UndefOr[String]?, icon: js.UndefOr[String]?, lang: js.UndefOr[String]?, noscreen: js.UndefOr[Boolean]?, renotify: js.UndefOr[Boolean]?, silent: js.UndefOr[Boolean]?, sound: js.UndefOr[String]?, sticky: js.UndefOr[Boolean]?, tag: js.UndefOr[String]?, onclick: js.UndefOr[js.Function0[Any]]?, onerror: js.UndefOr[js.Function0[Any]]?, vibrate: js.UndefOr[js.Array[Double]]?): NotificationOptions (@deprecated in 2.0.0) +NotificationOptions[SO] def apply(body: js.UndefOr[String]?, dir: js.UndefOr[String]?, icon: js.UndefOr[String]?, lang: js.UndefOr[String]?, noscreen: js.UndefOr[Boolean]?, renotify: js.UndefOr[Boolean]?, silent: js.UndefOr[Boolean]?, sound: js.UndefOr[String]?, sticky: js.UndefOr[Boolean]?, tag: js.UndefOr[String]?, onclick: js.UndefOr[js.Function1[Event, Any]]?, onerror: js.UndefOr[js.Function1[ErrorEvent, Any]]?, vibrate: js.UndefOr[js.Array[Double]]?): NotificationOptions (@deprecated in 2.0.0) OfflineAudioCompletionEvent[JT] def bubbles: Boolean OfflineAudioCompletionEvent[JT] def cancelBubble: Boolean OfflineAudioCompletionEvent[JT] def cancelable: Boolean @@ -25009,7 +25012,7 @@ WebSocket[JC] def close(code: Int?, reason: String?): Unit WebSocket[JC] def dispatchEvent(evt: Event): Boolean WebSocket[JC] def extensions: String WebSocket[JC] var onclose: js.Function1[CloseEvent, _] -WebSocket[JC] var onerror: js.Function1[Event, _] +WebSocket[JC] var onerror: js.Function1[ErrorEvent, _] WebSocket[JC] var onmessage: js.Function1[MessageEvent, _] WebSocket[JC] var onopen: js.Function1[Event, _] WebSocket[JC] def readyState: Int @@ -26245,6 +26248,7 @@ raw[SO] lazy val Blob: dom.Blob.type (@deprecated in 2.0.0) raw[SO] lazy val BlobPropertyBag: dom.BlobPropertyBag.type (@deprecated in 2.0.0) raw[SO] @deprecated("use dom.CSSRule instead", "2.0.0") def CSSRule = dom.CSSRule (@deprecated in 2.0.0) raw[SO] lazy val DOMException: dom.DOMException.type (@deprecated in 2.0.0) +raw[SO] @deprecated("use dom.DragEffect instead", "2.0.0") lazy val DragEffect = dom.DragEffect (@deprecated in 2.0.0) raw[SO] lazy val Event: dom.Event.type (@deprecated in 2.0.0) raw[SO] lazy val EventException: dom.EventException.type (@deprecated in 2.0.0) raw[SO] lazy val EventSource: dom.EventSource.type (@deprecated in 2.0.0) diff --git a/api-reports/2_13.txt b/api-reports/2_13.txt index 866b2dd7a..8cb77e199 100644 --- a/api-reports/2_13.txt +++ b/api-reports/2_13.txt @@ -1822,7 +1822,7 @@ EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Fu EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit EventSource[JC] def close(): Unit EventSource[JC] def dispatchEvent(evt: Event): Boolean -EventSource[JC] var onerror: js.Function1[Event, _] +EventSource[JC] var onerror: js.Function1[ErrorEvent, _] EventSource[JC] var onmessage: js.Function1[MessageEvent, _] EventSource[JC] var onopen: js.Function1[Event, _] EventSource[JC] def readyState: Int @@ -3184,7 +3184,7 @@ HTMLBodyElement[JC] var ondrop: js.Function1[DragEvent, _] HTMLBodyElement[JC] var ondurationchange: js.Function1[Event, _] HTMLBodyElement[JC] var onemptied: js.Function1[Event, _] HTMLBodyElement[JC] var onended: js.Function1[Event, _] -HTMLBodyElement[JC] var onerror: js.Function1[Event, _] +HTMLBodyElement[JC] var onerror: js.Function1[ErrorEvent, _] HTMLBodyElement[JC] var onfocus: js.Function1[FocusEvent, _] HTMLBodyElement[JC] var onfocusin: js.Function1[FocusEvent, _] HTMLBodyElement[JC] var onfocusout: js.Function1[FocusEvent, _] @@ -4413,7 +4413,7 @@ HTMLDocument[JC] var ondrop: js.Function1[DragEvent, _] HTMLDocument[JC] var ondurationchange: js.Function1[Event, _] HTMLDocument[JC] var onemptied: js.Function1[Event, _] HTMLDocument[JC] var onended: js.Function1[Event, _] -HTMLDocument[JC] var onerror: js.Function1[Event, _] +HTMLDocument[JC] var onerror: js.Function1[ErrorEvent, _] HTMLDocument[JC] var onfocus: js.Function1[FocusEvent, _] HTMLDocument[JC] var onfocusin: js.Function1[FocusEvent, _] HTMLDocument[JC] var onfocusout: js.Function1[FocusEvent, _] @@ -14014,14 +14014,15 @@ IDBDatabase[JC] def dispatchEvent(evt: Event): Boolean IDBDatabase[JC] def name: String IDBDatabase[JC] def objectStoreNames: DOMStringList IDBDatabase[JC] var onabort: js.Function1[Event, _] -IDBDatabase[JC] var onerror: js.Function1[Event, _] +IDBDatabase[JC] var onclose: js.Function1[CloseEvent, _] +IDBDatabase[JC] var onerror: js.Function1[ErrorEvent, _] IDBDatabase[JC] var onversionchange: js.Function1[IDBVersionChangeEvent, _] IDBDatabase[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit IDBDatabase[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit IDBDatabase[JC] def transaction(storeNames: String | js.Array[String], mode: js.UndefOr[IDBTransactionMode]?, options: js.UndefOr[IDBTransactionOptions]?): IDBTransaction -IDBDatabase[JC] def version: Int +IDBDatabase[JC] def version: Double IDBDatabaseInfo[JT] val name: String -IDBDatabaseInfo[JT] val version: Int +IDBDatabaseInfo[JT] val version: Double IDBEnvironment[JT] def indexedDB: IDBFactory (@deprecated in 1.2.0) IDBEvent[JC] def bubbles: Boolean IDBEvent[JC] def cancelBubble: Boolean @@ -14046,7 +14047,7 @@ IDBEventTarget[JC] def result: A IDBFactory[JC] def cmp(first: IDBValue, second: IDBValue): Int IDBFactory[JC] def databases(): js.Promise[js.Array[IDBDatabaseInfo]] IDBFactory[JC] def deleteDatabase(name: String): IDBOpenDBRequest[Unit] -IDBFactory[JC] def open(name: String, version: Int?): IDBOpenDBRequest[IDBDatabase] +IDBFactory[JC] def open(name: String, version: Double?): IDBOpenDBRequest[IDBDatabase] IDBIndex[JC] def count(query: IDBKey | IDBKeyRange?): IDBRequest[S, Double] IDBIndex[JC] def get(key: IDBKey | IDBKeyRange): IDBRequest[S, IDBValue] IDBIndex[JC] def getAll(query: js.UndefOr[IDBKeyRange | IDBKey]?, count: js.UndefOr[Double]?): IDBRequest[S, js.Array[IDBValue]] @@ -14090,7 +14091,7 @@ IDBOpenDBRequest[JC] def addEventListener[T <: Event](`type`: String, listener: IDBOpenDBRequest[JC] def dispatchEvent(evt: Event): Boolean IDBOpenDBRequest[JC] def error: DOMException IDBOpenDBRequest[JC] var onblocked: js.Function1[IDBVersionChangeEvent, _] -IDBOpenDBRequest[JC] var onerror: js.Function1[Event, _] +IDBOpenDBRequest[JC] var onerror: js.Function1[ErrorEvent, _] IDBOpenDBRequest[JC] var onsuccess: js.Function1[IDBEvent[A], _] IDBOpenDBRequest[JC] var onupgradeneeded: js.Function1[IDBVersionChangeEvent, _] IDBOpenDBRequest[JC] def readyState: String @@ -14103,7 +14104,7 @@ IDBRequest[JC] def addEventListener[T <: Event](`type`: String, listener: js.Fun IDBRequest[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit IDBRequest[JC] def dispatchEvent(evt: Event): Boolean IDBRequest[JC] def error: DOMException -IDBRequest[JC] var onerror: js.Function1[Event, _] +IDBRequest[JC] var onerror: js.Function1[ErrorEvent, _] IDBRequest[JC] var onsuccess: js.Function1[IDBEvent[A], _] IDBRequest[JC] def readyState: String IDBRequest[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit @@ -14130,7 +14131,7 @@ IDBTransaction[JC] def mode: IDBTransactionMode IDBTransaction[JC] def objectStore(name: String): IDBObjectStore IDBTransaction[JC] var onabort: js.Function1[Event, _] IDBTransaction[JC] var oncomplete: js.Function1[Event, _] -IDBTransaction[JC] var onerror: js.Function1[Event, _] +IDBTransaction[JC] var onerror: js.Function1[ErrorEvent, _] IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit IDBTransactionDurability[JT] @@ -14149,8 +14150,8 @@ IDBVersionChangeEvent[JC] def currentTarget: EventTarget IDBVersionChangeEvent[JC] def defaultPrevented: Boolean IDBVersionChangeEvent[JC] def eventPhase: Int IDBVersionChangeEvent[JC] def isTrusted: Boolean -IDBVersionChangeEvent[JC] def newVersion: Integer -IDBVersionChangeEvent[JC] def oldVersion: Int +IDBVersionChangeEvent[JC] def newVersion: java.lang.Double +IDBVersionChangeEvent[JC] def oldVersion: Double IDBVersionChangeEvent[JC] def preventDefault(): Unit IDBVersionChangeEvent[JC] def stopImmediatePropagation(): Unit IDBVersionChangeEvent[JC] def stopPropagation(): Unit @@ -14158,11 +14159,13 @@ IDBVersionChangeEvent[JC] def target: EventTarget IDBVersionChangeEvent[JC] override def target: IDBEventTarget[A] IDBVersionChangeEvent[JC] def timeStamp: Double IDBVersionChangeEvent[JC] def `type`: String +IDBVersionChangeEvent[SO] def newVersionOption: Option[Double] +IDBVersionChangeEvent.Ops[SC] def newVersionOption: Option[Double] IDBVersionChangeEventInit[JT] var bubbles: js.UndefOr[Boolean] IDBVersionChangeEventInit[JT] var cancelable: js.UndefOr[Boolean] IDBVersionChangeEventInit[JT] var composed: js.UndefOr[Boolean] -IDBVersionChangeEventInit[JT] var newVersion: js.UndefOr[Integer] -IDBVersionChangeEventInit[JT] var oldVersion: js.UndefOr[Int] +IDBVersionChangeEventInit[JT] var newVersion: js.UndefOr[java.lang.Double] +IDBVersionChangeEventInit[JT] var oldVersion: js.UndefOr[Double] IDBVersionChangeEventInit[JT] var scoped: js.UndefOr[Boolean] ImageBitmap[JT] def close(): Unit ImageBitmap[JT] def height: Double @@ -15169,8 +15172,8 @@ Notification[JC] def dispatchEvent(evt: Event): Boolean Notification[JC] val icon: String Notification[JC] val lang: String Notification[JC] val noscreen: Boolean -Notification[JC] var onclick: js.Function0[Any] -Notification[JC] var onerror: js.Function0[Any] +Notification[JC] var onclick: js.Function1[Event, Any] +Notification[JC] var onerror: js.Function1[ErrorEvent, Any] Notification[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit Notification[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit Notification[JC] val renotify: Boolean @@ -15186,15 +15189,15 @@ NotificationOptions[JT] var dir: js.UndefOr[String] NotificationOptions[JT] var icon: js.UndefOr[String] NotificationOptions[JT] var lang: js.UndefOr[String] NotificationOptions[JT] var noscreen: js.UndefOr[Boolean] -NotificationOptions[JT] var onclick: js.UndefOr[js.Function0[Any]] -NotificationOptions[JT] var onerror: js.UndefOr[js.Function0[Any]] +NotificationOptions[JT] var onclick: js.UndefOr[js.Function1[Event, Any]] +NotificationOptions[JT] var onerror: js.UndefOr[js.Function1[ErrorEvent, Any]] NotificationOptions[JT] var renotify: js.UndefOr[Boolean] NotificationOptions[JT] var silent: js.UndefOr[Boolean] NotificationOptions[JT] var sound: js.UndefOr[String] NotificationOptions[JT] var sticky: js.UndefOr[Boolean] NotificationOptions[JT] var tag: js.UndefOr[String] NotificationOptions[JT] var vibrate: js.UndefOr[js.Array[Double]] -NotificationOptions[SO] def apply(body: js.UndefOr[String]?, dir: js.UndefOr[String]?, icon: js.UndefOr[String]?, lang: js.UndefOr[String]?, noscreen: js.UndefOr[Boolean]?, renotify: js.UndefOr[Boolean]?, silent: js.UndefOr[Boolean]?, sound: js.UndefOr[String]?, sticky: js.UndefOr[Boolean]?, tag: js.UndefOr[String]?, onclick: js.UndefOr[js.Function0[Any]]?, onerror: js.UndefOr[js.Function0[Any]]?, vibrate: js.UndefOr[js.Array[Double]]?): NotificationOptions (@deprecated in 2.0.0) +NotificationOptions[SO] def apply(body: js.UndefOr[String]?, dir: js.UndefOr[String]?, icon: js.UndefOr[String]?, lang: js.UndefOr[String]?, noscreen: js.UndefOr[Boolean]?, renotify: js.UndefOr[Boolean]?, silent: js.UndefOr[Boolean]?, sound: js.UndefOr[String]?, sticky: js.UndefOr[Boolean]?, tag: js.UndefOr[String]?, onclick: js.UndefOr[js.Function1[Event, Any]]?, onerror: js.UndefOr[js.Function1[ErrorEvent, Any]]?, vibrate: js.UndefOr[js.Array[Double]]?): NotificationOptions (@deprecated in 2.0.0) OfflineAudioCompletionEvent[JT] def bubbles: Boolean OfflineAudioCompletionEvent[JT] def cancelBubble: Boolean OfflineAudioCompletionEvent[JT] def cancelable: Boolean @@ -25009,7 +25012,7 @@ WebSocket[JC] def close(code: Int?, reason: String?): Unit WebSocket[JC] def dispatchEvent(evt: Event): Boolean WebSocket[JC] def extensions: String WebSocket[JC] var onclose: js.Function1[CloseEvent, _] -WebSocket[JC] var onerror: js.Function1[Event, _] +WebSocket[JC] var onerror: js.Function1[ErrorEvent, _] WebSocket[JC] var onmessage: js.Function1[MessageEvent, _] WebSocket[JC] var onopen: js.Function1[Event, _] WebSocket[JC] def readyState: Int @@ -26245,6 +26248,7 @@ raw[SO] lazy val Blob: dom.Blob.type (@deprecated in 2.0.0) raw[SO] lazy val BlobPropertyBag: dom.BlobPropertyBag.type (@deprecated in 2.0.0) raw[SO] @deprecated("use dom.CSSRule instead", "2.0.0") def CSSRule = dom.CSSRule (@deprecated in 2.0.0) raw[SO] lazy val DOMException: dom.DOMException.type (@deprecated in 2.0.0) +raw[SO] @deprecated("use dom.DragEffect instead", "2.0.0") lazy val DragEffect = dom.DragEffect (@deprecated in 2.0.0) raw[SO] lazy val Event: dom.Event.type (@deprecated in 2.0.0) raw[SO] lazy val EventException: dom.EventException.type (@deprecated in 2.0.0) raw[SO] lazy val EventSource: dom.EventSource.type (@deprecated in 2.0.0) diff --git a/dom/src/main/scala/org/scalajs/dom/EventSource.scala b/dom/src/main/scala/org/scalajs/dom/EventSource.scala index 8ab550845..2d299f245 100644 --- a/dom/src/main/scala/org/scalajs/dom/EventSource.scala +++ b/dom/src/main/scala/org/scalajs/dom/EventSource.scala @@ -39,7 +39,7 @@ class EventSource(URL: String, settings: js.Dynamic = null) extends EventTarget var onmessage: js.Function1[MessageEvent, _] = js.native - var onerror: js.Function1[Event, _] = js.native + var onerror: js.Function1[ErrorEvent, _] = js.native /** The close() method must abort any instances of the fetch algorithm started for this EventSource object, and must * set the readyState attribute to CLOSED. W3C 2012 diff --git a/dom/src/main/scala/org/scalajs/dom/HTMLBodyElement.scala b/dom/src/main/scala/org/scalajs/dom/HTMLBodyElement.scala index 821ca5e56..cc464e523 100644 --- a/dom/src/main/scala/org/scalajs/dom/HTMLBodyElement.scala +++ b/dom/src/main/scala/org/scalajs/dom/HTMLBodyElement.scala @@ -27,7 +27,7 @@ abstract class HTMLBodyElement extends HTMLElement { * triggered when the event reaches the window, not the body element. Use addEventListener() to attach an event * listener to the body element. */ - var onerror: js.Function1[Event, _] = js.native + var onerror: js.Function1[ErrorEvent, _] = js.native /** Reflects the onresize HTML attribute value for a function to call when the document has been resized. */ var onresize: js.Function1[UIEvent, _] = js.native diff --git a/dom/src/main/scala/org/scalajs/dom/HTMLDocument.scala b/dom/src/main/scala/org/scalajs/dom/HTMLDocument.scala index 4ccccc5be..156288654 100644 --- a/dom/src/main/scala/org/scalajs/dom/HTMLDocument.scala +++ b/dom/src/main/scala/org/scalajs/dom/HTMLDocument.scala @@ -287,7 +287,7 @@ abstract class HTMLDocument extends Document { var onloadedmetadata: js.Function1[Event, _] = js.native - var onerror: js.Function1[Event, _] = js.native + var onerror: js.Function1[ErrorEvent, _] = js.native var onplay: js.Function1[Event, _] = js.native diff --git a/dom/src/main/scala/org/scalajs/dom/IDBDatabase.scala b/dom/src/main/scala/org/scalajs/dom/IDBDatabase.scala index 07f6b7f31..8dafdc00b 100644 --- a/dom/src/main/scala/org/scalajs/dom/IDBDatabase.scala +++ b/dom/src/main/scala/org/scalajs/dom/IDBDatabase.scala @@ -26,7 +26,7 @@ class IDBDatabase extends EventTarget { * you should use [[IDBVersionChangeEvent#newVersion]] instead. Webkit returns always integer and the value is 1 when * database is first created. */ - def version: Int = js.native + def version: Double = js.native /** A DOMString that contains the name of the connected database. */ def name: String = js.native @@ -34,8 +34,16 @@ class IDBDatabase extends EventTarget { /** A DOMStringList that contains a list of the names of the object stores currently in the connected database. */ def objectStoreNames: DOMStringList = js.native + /** The onclose event handler of the IDBDatabase interface handles the close event, which is fired when the database + * is unexpectedly closed. This can happen, for example, when the application is shut down or access to the disk the + * database is stored on is lost while the database is open. + * + * The close event is fired after all transactions have been aborted and the connection has been closed. + */ + var onclose: js.Function1[CloseEvent, _] = js.native + /** Fires when access to the database fails. */ - var onerror: js.Function1[Event, _] = js.native + var onerror: js.Function1[ErrorEvent, _] = js.native /** Fires when access of the database is aborted. */ var onabort: js.Function1[Event, _] = js.native diff --git a/dom/src/main/scala/org/scalajs/dom/IDBDatabaseInfo.scala b/dom/src/main/scala/org/scalajs/dom/IDBDatabaseInfo.scala index 2b361e960..fea21ccc7 100644 --- a/dom/src/main/scala/org/scalajs/dom/IDBDatabaseInfo.scala +++ b/dom/src/main/scala/org/scalajs/dom/IDBDatabaseInfo.scala @@ -11,5 +11,5 @@ import scala.scalajs.js @js.native trait IDBDatabaseInfo extends js.Object { val name: String = js.native - val version: Int = js.native + val version: Double = js.native } diff --git a/dom/src/main/scala/org/scalajs/dom/IDBFactory.scala b/dom/src/main/scala/org/scalajs/dom/IDBFactory.scala index 5218fb5fd..3c0161360 100644 --- a/dom/src/main/scala/org/scalajs/dom/IDBFactory.scala +++ b/dom/src/main/scala/org/scalajs/dom/IDBFactory.scala @@ -25,7 +25,7 @@ class IDBFactory extends js.Object { * * w3c spec [[http://www.w3.org/TR/IndexedDB/#requests ¶3.2.3 Opening a database]] */ - def open(name: String, version: Int = js.native): IDBOpenDBRequest[IDBDatabase] = js.native + def open(name: String, version: Double = js.native): IDBOpenDBRequest[IDBDatabase] = js.native /** Compares two values as keys to determine equality and ordering for IndexedDB operations, such as storing and * iterating. diff --git a/dom/src/main/scala/org/scalajs/dom/IDBRequest.scala b/dom/src/main/scala/org/scalajs/dom/IDBRequest.scala index 27a999c82..04f53c812 100644 --- a/dom/src/main/scala/org/scalajs/dom/IDBRequest.scala +++ b/dom/src/main/scala/org/scalajs/dom/IDBRequest.scala @@ -17,6 +17,9 @@ import scala.scalajs.js.annotation._ * information becomes available, an event is fired on the request, and the information becomes available through the * properties of the IDBRequest instance. * + * @tparam S + * Type of `.source` on events + * * @tparam A * Type of `.target.result` on events */ @@ -41,7 +44,7 @@ class IDBRequest[+S, A] extends EventTarget { def transaction: IDBTransaction = js.native /** The event handler for the error event. */ - var onerror: js.Function1[Event, _] = js.native + var onerror: js.Function1[ErrorEvent, _] = js.native /** The state of the request. Every request starts in the pending state. The state changes to done when the request * completes successfully or when an error occurs. diff --git a/dom/src/main/scala/org/scalajs/dom/IDBTransaction.scala b/dom/src/main/scala/org/scalajs/dom/IDBTransaction.scala index bb1c0c6c0..c49ccb1bc 100644 --- a/dom/src/main/scala/org/scalajs/dom/IDBTransaction.scala +++ b/dom/src/main/scala/org/scalajs/dom/IDBTransaction.scala @@ -36,7 +36,7 @@ class IDBTransaction extends EventTarget { def error: DOMException = js.native /** The event handler for the onerror event. */ - var onerror: js.Function1[Event, _] = js.native + var onerror: js.Function1[ErrorEvent, _] = js.native /** The event handler for the onabort event. */ var onabort: js.Function1[Event, _] = js.native diff --git a/dom/src/main/scala/org/scalajs/dom/IDBVersionChangeEvent.scala b/dom/src/main/scala/org/scalajs/dom/IDBVersionChangeEvent.scala index 0b44a5258..48077c07b 100644 --- a/dom/src/main/scala/org/scalajs/dom/IDBVersionChangeEvent.scala +++ b/dom/src/main/scala/org/scalajs/dom/IDBVersionChangeEvent.scala @@ -21,8 +21,24 @@ class IDBVersionChangeEvent(typeArg: String, init: js.UndefOr[IDBVersionChangeEv * * This is null when the database is being deleted. */ - def newVersion: Integer = js.native + def newVersion: java.lang.Double = js.native /** Returns the old version of the database. */ - def oldVersion: Int = js.native + def oldVersion: Double = js.native +} + +object IDBVersionChangeEvent { + + @inline implicit final class Ops(private val e: IDBVersionChangeEvent) extends AnyVal { + + /** Returns the new version of the database. + * + * This is None when the database is being deleted. + */ + def newVersionOption: Option[Double] = + (e.newVersion: Any) match { + case i: Double => Some(i) + case _ => None + } + } } diff --git a/dom/src/main/scala/org/scalajs/dom/IDBVersionChangeEventInit.scala b/dom/src/main/scala/org/scalajs/dom/IDBVersionChangeEventInit.scala index 4c836673e..85bce8ef2 100644 --- a/dom/src/main/scala/org/scalajs/dom/IDBVersionChangeEventInit.scala +++ b/dom/src/main/scala/org/scalajs/dom/IDBVersionChangeEventInit.scala @@ -9,6 +9,6 @@ package org.scalajs.dom import scala.scalajs.js trait IDBVersionChangeEventInit extends EventInit { - var newVersion: js.UndefOr[Integer] = js.undefined - var oldVersion: js.UndefOr[Int] = js.undefined + var newVersion: js.UndefOr[java.lang.Double] = js.undefined + var oldVersion: js.UndefOr[Double] = js.undefined } diff --git a/dom/src/main/scala/org/scalajs/dom/Notification.scala b/dom/src/main/scala/org/scalajs/dom/Notification.scala index 28f29f0f5..2b31e75b3 100644 --- a/dom/src/main/scala/org/scalajs/dom/Notification.scala +++ b/dom/src/main/scala/org/scalajs/dom/Notification.scala @@ -72,13 +72,13 @@ class Notification(title: String, options: NotificationOptions = ???) extends Ev /** The onclick property of the Notification interface specifies an event listener to receive click events. These * events occur when the user clicks on a displayed Notification. */ - var onclick: js.Function0[Any] = js.native + var onclick: js.Function1[Event, Any] = js.native /** The onerror property of the Notification interface specifies an event listener to receive error events. These * events occur when something goes wrong with a Notification (in many cases an error preventing the notification * from being displayed.) */ - var onerror: js.Function0[Any] = js.native + var onerror: js.Function1[ErrorEvent, Any] = js.native /** The renotify read-only property of the Notification interface specifies whether the user should be notified after * a new notification replaces an old one, as specified in the renotify option of the Notification() constructor. diff --git a/dom/src/main/scala/org/scalajs/dom/NotificationOptions.scala b/dom/src/main/scala/org/scalajs/dom/NotificationOptions.scala index 7dc401bb0..2a8b1c6ae 100644 --- a/dom/src/main/scala/org/scalajs/dom/NotificationOptions.scala +++ b/dom/src/main/scala/org/scalajs/dom/NotificationOptions.scala @@ -54,13 +54,13 @@ trait NotificationOptions extends js.Object { /** The onclick property of the Notification interface specifies an event listener to receive click events. These * events occur when the user clicks on a displayed Notification. */ - var onclick: js.UndefOr[js.Function0[Any]] = js.undefined + var onclick: js.UndefOr[js.Function1[Event, Any]] = js.undefined /** The onerror property of the Notification interface specifies an event listener to receive error events. These * events occur when something goes wrong with a Notification (in many cases an error preventing the notification * from being displayed.) */ - var onerror: js.UndefOr[js.Function0[Any]] = js.undefined + var onerror: js.UndefOr[js.Function1[ErrorEvent, Any]] = js.undefined var vibrate: js.UndefOr[js.Array[Double]] = js.undefined } @@ -104,7 +104,8 @@ object NotificationOptions { noscreen: js.UndefOr[Boolean] = js.undefined, renotify: js.UndefOr[Boolean] = js.undefined, silent: js.UndefOr[Boolean] = js.undefined, sound: js.UndefOr[String] = js.undefined, sticky: js.UndefOr[Boolean] = js.undefined, tag: js.UndefOr[String] = js.undefined, - onclick: js.UndefOr[js.Function0[Any]] = js.undefined, onerror: js.UndefOr[js.Function0[Any]] = js.undefined, + onclick: js.UndefOr[js.Function1[Event, Any]] = js.undefined, + onerror: js.UndefOr[js.Function1[ErrorEvent, Any]] = js.undefined, vibrate: js.UndefOr[js.Array[Double]] = js.undefined ): NotificationOptions = { val body0 = body diff --git a/dom/src/main/scala/org/scalajs/dom/WebSocket.scala b/dom/src/main/scala/org/scalajs/dom/WebSocket.scala index 9add4e184..87d8da4a5 100644 --- a/dom/src/main/scala/org/scalajs/dom/WebSocket.scala +++ b/dom/src/main/scala/org/scalajs/dom/WebSocket.scala @@ -54,7 +54,7 @@ class WebSocket(var url: String = js.native, var protocol: String = js.native) e var onclose: js.Function1[CloseEvent, _] = js.native /** An event listener to be called when an error occurs. This is a simple event named "error". */ - var onerror: js.Function1[Event, _] = js.native + var onerror: js.Function1[ErrorEvent, _] = js.native /** A string indicating the type of binary data being transmitted by the connection. This should be either "blob" if * DOM Blob objects are being used or "arraybuffer" if ArrayBuffer objects are being used. diff --git a/dom/src/main/scala/org/scalajs/dom/raw.scala b/dom/src/main/scala/org/scalajs/dom/raw.scala index ba957f84c..081374e90 100644 --- a/dom/src/main/scala/org/scalajs/dom/raw.scala +++ b/dom/src/main/scala/org/scalajs/dom/raw.scala @@ -924,4 +924,7 @@ object raw { /** Returns an object reference to the DedicatedWorkerGlobalScope object itself. */ def self: DedicatedWorkerGlobalScope = js.native } + + @deprecated("use dom.DragEffect instead", "2.0.0") + lazy val DragEffect = dom.DragEffect }