Skip to content
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

Minor fixes #616

Merged
merged 6 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -26245,6 +26245,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)
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 @@ -26245,6 +26245,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)
Expand Down
16 changes: 16 additions & 0 deletions dom/src/main/scala/org/scalajs/dom/IDBVersionChangeEvent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,19 @@ class IDBVersionChangeEvent(typeArg: String, init: js.UndefOr[IDBVersionChangeEv
/** Returns the old version of the database. */
def oldVersion: Int = 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[Int] =
japgolly marked this conversation as resolved.
Show resolved Hide resolved
(e.newVersion: Any) match {
case i: Int => Some(i)
case _ => None
}
}
}
3 changes: 3 additions & 0 deletions dom/src/main/scala/org/scalajs/dom/raw.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
}