Skip to content

Commit 43e84ae

Browse files
authored
Merge branch 'master' into sw-onerror
2 parents 050eab9 + 6b2733a commit 43e84ae

File tree

8 files changed

+46
-53
lines changed

8 files changed

+46
-53
lines changed

.github/workflows/ci.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
scalaversion: ["2.11.12", "2.12.10", "2.13.1"]
16-
scalajsversion: ["1.x", "0.6.x"]
17-
include:
18-
- scalaversion: "2.10.7"
19-
scalajsversion: "0.6.x"
20-
env:
21-
SCALAJS_VERSION: "${{ matrix.scalajsversion == '0.6.x' && '0.6.28' || '' }}"
15+
scalaversion: ["2.11.12", "2.12.12", "2.13.4", "3.0.1"]
2216
steps:
2317
- uses: actions/checkout@v2
2418
- uses: olafurpg/setup-scala@v10

build.sbt

+4-8
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ lazy val root = project.in(file(".")).
55

66
name := "Scala.js DOM"
77

8-
crossScalaVersions in ThisBuild := {
9-
if (scalaJSVersion.startsWith("1.")) Seq("2.12.10", "2.11.12", "2.13.1")
10-
else Seq("2.12.10", "2.11.12", "2.10.7", "2.13.1")
11-
}
12-
scalaVersion in ThisBuild := crossScalaVersions.value.head
8+
ThisBuild / crossScalaVersions := Seq("2.12.12", "2.11.12", "2.13.4", "3.0.1")
9+
ThisBuild / scalaVersion := crossScalaVersions.value.head
1310

1411
val commonSettings = Seq(
15-
version := "1.2.0-SNAPSHOT",
12+
version := "2.0.0-SNAPSHOT",
1613
organization := "org.scala-js",
1714
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings")
1815
)
@@ -36,7 +33,6 @@ scalacOptions ++= {
3633
}
3734

3835
def hasNewCollections(version: String): Boolean = {
39-
!version.startsWith("2.10.") &&
4036
!version.startsWith("2.11.") &&
4137
!version.startsWith("2.12.")
4238
}
@@ -104,7 +100,7 @@ lazy val readme = ScalatexReadme(
104100
).settings(
105101
scalaVersion := "2.12.10",
106102
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"),
107-
(resources in Compile) += (fullOptJS in (example, Compile)).value.data
103+
(Compile / resources) += (example / Compile / fullOptJS).value.data
108104
)
109105

110106
lazy val example = project.

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.2.8
1+
sbt.version=1.5.5

project/build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
val scalaJSVersion =
2-
Option(System.getenv("SCALAJS_VERSION")).filter(_ != "").getOrElse("1.0.0")
2+
Option(System.getenv("SCALAJS_VERSION")).filter(_ != "").getOrElse("1.5.0")
33

44
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
55

src/main/scala/org/scalajs/dom/crypto/Crypto.scala

-2
Original file line numberDiff line numberDiff line change
@@ -930,10 +930,8 @@ object KeyFormat {
930930
trait RSAPublicKey extends js.Object {
931931

932932
/* modulus, as a base64 URL encoded String */
933-
@js.native
934933
def n: String = js.native
935934

936935
/* exponent, as a base64 URL encoded String */
937-
@js.native
938936
def e: String = js.native
939937
}

src/main/scala/org/scalajs/dom/experimental/intl/Intl.scala

+29-29
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ object CollatorOptions {
123123
): CollatorOptions = {
124124
js.Dynamic
125125
.literal(
126-
localeMatcher = localeMatcher,
127-
usage = usage,
128-
sensitivity = sensitivity,
129-
ignorePunctuation = ignorePunctuation,
130-
numeric = numeric,
131-
caseFirst = caseFirst
126+
localeMatcher = localeMatcher.asInstanceOf[js.Any],
127+
usage = usage.asInstanceOf[js.Any],
128+
sensitivity = sensitivity.asInstanceOf[js.Any],
129+
ignorePunctuation = ignorePunctuation.asInstanceOf[js.Any],
130+
numeric = numeric.asInstanceOf[js.Any],
131+
caseFirst = caseFirst.asInstanceOf[js.Any]
132132
)
133133
.asInstanceOf[CollatorOptions]
134134
}
@@ -200,19 +200,19 @@ object DateTimeFormatOptions {
200200
// format: off
201201
js.Dynamic
202202
.literal(
203-
localeMatcher = localeMatcher,
204-
timeZone = timeZone,
205-
hour12 = hour12,
206-
formatMatcher = formatMatcher,
207-
weekday = weekday,
208-
era = era,
209-
year = year,
210-
month = month,
211-
day = day,
212-
hour = hour,
213-
minute = minute,
214-
second = second,
215-
timeZoneName = timeZoneName
203+
localeMatcher = localeMatcher.asInstanceOf[js.Any],
204+
timeZone = timeZone.asInstanceOf[js.Any],
205+
hour12 = hour12.asInstanceOf[js.Any],
206+
formatMatcher = formatMatcher.asInstanceOf[js.Any],
207+
weekday = weekday.asInstanceOf[js.Any],
208+
era = era.asInstanceOf[js.Any],
209+
year = year.asInstanceOf[js.Any],
210+
month = month.asInstanceOf[js.Any],
211+
day = day.asInstanceOf[js.Any],
212+
hour = hour.asInstanceOf[js.Any],
213+
minute = minute.asInstanceOf[js.Any],
214+
second = second.asInstanceOf[js.Any],
215+
timeZoneName = timeZoneName.asInstanceOf[js.Any]
216216
)
217217
.asInstanceOf[DateTimeFormatOptions]
218218
// format: on
@@ -300,16 +300,16 @@ object NumberFormatOptions {
300300
): NumberFormatOptions = {
301301
js.Dynamic
302302
.literal(
303-
localeMatcher = localeMatcher,
304-
style = style,
305-
currency = currency,
306-
currencyDisplay = currencyDisplay,
307-
useGrouping = useGrouping,
308-
minimumIntegerDigits = minimumIntegerDigits,
309-
minimumFractionDigits = minimumFractionDigits,
310-
maximumFractionDigits = maximumFractionDigits,
311-
minimumSignificantDigits = minimumSignificantDigits,
312-
maximumSignificantDigits = maximumSignificantDigits
303+
localeMatcher = localeMatcher.asInstanceOf[js.Any],
304+
style = style.asInstanceOf[js.Any],
305+
currency = currency.asInstanceOf[js.Any],
306+
currencyDisplay = currencyDisplay.asInstanceOf[js.Any],
307+
useGrouping = useGrouping.asInstanceOf[js.Any],
308+
minimumIntegerDigits = minimumIntegerDigits.asInstanceOf[js.Any],
309+
minimumFractionDigits = minimumFractionDigits.asInstanceOf[js.Any],
310+
maximumFractionDigits = maximumFractionDigits.asInstanceOf[js.Any],
311+
minimumSignificantDigits = minimumSignificantDigits.asInstanceOf[js.Any],
312+
maximumSignificantDigits = maximumSignificantDigits.asInstanceOf[js.Any]
313313
)
314314
.asInstanceOf[NumberFormatOptions]
315315
}

src/main/scala/org/scalajs/dom/ext/package.scala

+8-5
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,20 @@ package object ext {
2222
def cast[T] = x.asInstanceOf[T]
2323
}
2424

25-
implicit def pimpAnimatedNumber(x: svg.AnimatedNumber) = x.baseVal
25+
implicit def pimpAnimatedNumber(x: svg.AnimatedNumber): Double = x.baseVal
2626

27-
implicit def pimpRichAnimatedNumber(x: svg.AnimatedNumber) =
27+
implicit def pimpRichAnimatedNumber(
28+
x: svg.AnimatedNumber): runtime.RichDouble =
2829
x.baseVal: runtime.RichDouble
2930

30-
implicit def pimpAnimatedLength(x: svg.AnimatedLength) = x.baseVal.value
31+
implicit def pimpAnimatedLength(x: svg.AnimatedLength): Double =
32+
x.baseVal.value
3133

32-
implicit def pimpRichAnimatedLength(x: svg.AnimatedLength) =
34+
implicit def pimpRichAnimatedLength(
35+
x: svg.AnimatedLength): runtime.RichDouble =
3336
x.baseVal.value: runtime.RichDouble
3437

35-
implicit def color2String(c: Color) = c.toString
38+
implicit def color2String(c: Color): String = c.toString
3639
implicit class pimpedContext(val ctx: CanvasRenderingContext2D) {
3740
def prepCircle(x: Double, y: Double, r: Double) = {
3841
ctx.beginPath()

src/main/scala/org/scalajs/dom/raw/lib.scala

+2
Original file line numberDiff line numberDiff line change
@@ -2566,6 +2566,8 @@ class Window
25662566
*/
25672567
def close(): Unit = js.native
25682568

2569+
def closed: Boolean = js.native
2570+
25692571
/**
25702572
* The window.postMessage method safely enables cross-origin communication.
25712573
* Normally, scripts on different pages are allowed to access each other if and only if

0 commit comments

Comments
 (0)