diff --git a/build.sbt b/build.sbt index 371ebc4c8..06a9d510b 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ lazy val root = project.in(file(".")). name := "Scala.js DOM" crossScalaVersions in ThisBuild := { - if (scalaJSVersion.startsWith("1.")) Seq("2.12.10", "2.11.12", "2.13.1") + if (scalaJSVersion.startsWith("1.")) Seq("2.12.10", "2.11.12", "2.13.1", "3.0.0-M3") else Seq("2.12.10", "2.11.12", "2.10.7", "2.13.1") } scalaVersion in ThisBuild := crossScalaVersions.value.head diff --git a/project/build.properties b/project/build.properties index c0bab0494..d91c272d4 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.2.8 +sbt.version=1.4.6 diff --git a/project/build.sbt b/project/build.sbt index d94bec0ad..cee0bd4e8 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1,8 +1,10 @@ val scalaJSVersion = - Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.0.0") + Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.3.1") addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.3.11") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.0") + +addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.1") \ No newline at end of file diff --git a/src/main/scala/org/scalajs/dom/crypto/Crypto.scala b/src/main/scala/org/scalajs/dom/crypto/Crypto.scala index e411dfc51..29febf9ea 100644 --- a/src/main/scala/org/scalajs/dom/crypto/Crypto.scala +++ b/src/main/scala/org/scalajs/dom/crypto/Crypto.scala @@ -930,10 +930,10 @@ object KeyFormat { trait RSAPublicKey extends js.Object { /* modulus, as a base64 URL encoded String */ - @js.native + // @js.native def n: String = js.native /* exponent, as a base64 URL encoded String */ - @js.native + // @js.native def e: String = js.native } diff --git a/src/main/scala/org/scalajs/dom/ext/Extensions.scala b/src/main/scala/org/scalajs/dom/ext/Extensions.scala index 74a5fb255..af04a43d8 100644 --- a/src/main/scala/org/scalajs/dom/ext/Extensions.scala +++ b/src/main/scala/org/scalajs/dom/ext/Extensions.scala @@ -213,7 +213,8 @@ object Ajax { implicit def byteBuffer2ajax(data: ByteBuffer): InputData = { if (data.hasTypedArray()) { // get relevant part of the underlying typed array - data.typedArray().subarray(data.position, data.limit) + val typedArray = data.typedArray() + typedArray.subarray(data.position, data.limit) } else { // fall back to copying the data val tempBuffer = ByteBuffer.allocateDirect(data.remaining) diff --git a/src/main/scala/org/scalajs/dom/ext/package.scala b/src/main/scala/org/scalajs/dom/ext/package.scala index 90e848b21..15098e4f9 100644 --- a/src/main/scala/org/scalajs/dom/ext/package.scala +++ b/src/main/scala/org/scalajs/dom/ext/package.scala @@ -22,17 +22,17 @@ package object ext { def cast[T] = x.asInstanceOf[T] } - implicit def pimpAnimatedNumber(x: svg.AnimatedNumber) = x.baseVal + implicit def pimpAnimatedNumber(x: svg.AnimatedNumber): Double = x.baseVal //: runtime.Double - implicit def pimpRichAnimatedNumber(x: svg.AnimatedNumber) = + implicit def pimpRichAnimatedNumber(x: svg.AnimatedNumber): runtime.RichDouble = x.baseVal: runtime.RichDouble - implicit def pimpAnimatedLength(x: svg.AnimatedLength) = x.baseVal.value + implicit def pimpAnimatedLength(x: svg.AnimatedLength): Double = x.baseVal.value - implicit def pimpRichAnimatedLength(x: svg.AnimatedLength) = + implicit def pimpRichAnimatedLength(x: svg.AnimatedLength): runtime.RichDouble = x.baseVal.value: runtime.RichDouble - implicit def color2String(c: Color) = c.toString + implicit def color2String(c: Color): String = c.toString implicit class pimpedContext(val ctx: CanvasRenderingContext2D) { def prepCircle(x: Double, y: Double, r: Double) = { ctx.beginPath()