Skip to content

Commit 8bab2a2

Browse files
author
exoego
committed
Merge remote-tracking branch 'upstream/master' into srcObject
2 parents 0a15f36 + ff0a50e commit 8bab2a2

File tree

22 files changed

+20
-1473
lines changed

22 files changed

+20
-1473
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jdk:
1212
- openjdk8
1313
env:
1414
- SCALAJS_VERSION=0.6.28
15-
- SCALAJS_VERSION=1.0.0-RC2
15+
- SCALAJS_VERSION=1.0.0
1616
matrix:
1717
exclude:
1818
- scala: 2.10.7
19-
env: SCALAJS_VERSION=1.0.0-RC2
19+
env: SCALAJS_VERSION=1.0.0
2020
include:
2121
- scala: 2.12.10
22-
env: SCALAJS_VERSION=0.6.28
22+
env: SCALAJS_VERSION=1.0.0
2323
script:
2424
- sbt readme/run
2525

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ crossScalaVersions in ThisBuild := {
1212
scalaVersion in ThisBuild := crossScalaVersions.value.head
1313

1414
val commonSettings = Seq(
15-
version := "0.9.9-SNAPSHOT",
15+
version := "1.0.1-SNAPSHOT",
1616
organization := "org.scala-js",
1717
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings")
1818
)

project/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
val scalaJSVersion =
2-
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.28")
2+
Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.0.0")
33

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

readme/Index.scalatex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
Add the following to your sbt build definition:
5656

5757
@hl.scala
58-
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "0.9.8"
58+
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "1.0.0"
5959

6060
@p
61-
then enjoy the types available in @hl.scala{org.scalajs.dom}. scalajs-dom 0.9.8 is built and published for Scala.js 0.6.17 and later, Scala.js 1.0.0-M8 and 1.0.0-RC1, with Scala 2.10, 2.11, 2.12 and 2.13. It will also most likely be published as is for further versions of Scala.js 1.x in the future.
61+
then enjoy the types available in @hl.scala{org.scalajs.dom}. scalajs-dom 1.0.0 is built and published for Scala.js 0.6.17+ and Scala.js 1.0.0+, with Scala 2.10, 2.11, 2.12 and 2.13.
6262

6363
@p
6464
To begin with, @code{scala-js-dom} organizes the full-list of DOM APIs into a number of buckets:

src/main/scala/org/scalajs/dom/experimental/Fetch.scala

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -74,60 +74,6 @@ class Request(input: RequestInfo, init: RequestInit = null) extends js.Object {
7474
def signal: AbortSignal = js.native
7575
}
7676

77-
object RequestInit {
78-
79-
/**
80-
* Create a RequestInit with some minimal typesafety on attributes.
81-
*
82-
* This method creates as light weight a RequestInit literal as possible
83-
* from the provided parameters, so as to allow the browser to work through
84-
* its default setting strategy.
85-
*
86-
* It is actually quite difficult to work out the defaults, which parameters
87-
* work together and which don't. Check the rules here in case of doubt:
88-
* - [[https://fetch.spec.whatwg.org/#requests ¶3.1.5 Requests]]
89-
* - [[https://fetch.spec.whatwg.org/#request-class ¶6.3 Request class]], especially the constructor function
90-
* of the whatwg Fetch spec.
91-
*
92-
* //todo: it would help a lot if there were a way to make this fully type safe
93-
*/
94-
@inline
95-
@deprecated("use `new RequestInit {}` instead", "0.9.7")
96-
def apply(method: js.UndefOr[HttpMethod] = js.undefined,
97-
headers: js.UndefOr[HeadersInit] = js.undefined,
98-
body: js.UndefOr[BodyInit] = js.undefined,
99-
referrer: js.UndefOr[String] = js.undefined, //should be USVString
100-
referrerPolicy: js.UndefOr[ReferrerPolicy] = js.undefined,
101-
mode: js.UndefOr[RequestMode] = js.undefined,
102-
credentials: js.UndefOr[RequestCredentials] = js.undefined,
103-
requestCache: js.UndefOr[RequestCache] = js.undefined,
104-
requestRedirect: js.UndefOr[RequestRedirect] = js.undefined,
105-
integrity: js.UndefOr[String] = js.undefined, //see [[https://w3c
106-
// .github.io/webappsec-subresource-integrity/ integrity spec]]
107-
window: js.UndefOr[Null] = js.undefined): RequestInit = {
108-
val result = js.Dynamic.literal()
109-
110-
@inline
111-
def set[T](attribute: String, value: js.UndefOr[T]) = value.foreach { x =>
112-
result.updateDynamic(attribute)(x.asInstanceOf[js.Any])
113-
}
114-
115-
set("method", method)
116-
set("headers", headers)
117-
set("body", body)
118-
set("referrer", referrer)
119-
set("referrerPolicy", referrerPolicy)
120-
set("mode", mode)
121-
set("credentials", credentials)
122-
set("cache", requestCache)
123-
set("redirect", requestRedirect)
124-
set("integrity", integrity)
125-
set("window", window)
126-
127-
result.asInstanceOf[RequestInit]
128-
}
129-
}
130-
13177
/**
13278
* See [[https://fetch.spec.whatwg.org/#requestinit RequestInit]] in Fetch API
13379
* The underlying object is a dictionary. This trait is here to help encode

src/main/scala/org/scalajs/dom/experimental/deviceorientation/DeviceOrientation.scala

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@ trait DeviceOrientationEventInit extends EventInit {
4848
var absolute: js.UndefOr[Boolean] = js.undefined
4949
}
5050

51-
object DeviceOrientationEventInit {
52-
@deprecated("Create new DeviceOrientationEventInit instead", "0.9.8")
53-
def apply(alpha: Double, beta: Double, gamma: Double,
54-
absolute: Boolean): DeviceOrientationEventInit = {
55-
js.Dynamic
56-
.literal(alpha = alpha, beta = beta, gamma = gamma, absolute = absolute)
57-
.asInstanceOf[DeviceOrientationEventInit]
58-
}
59-
}
60-
6151
trait DeviceAcceleration extends js.Any {
6252

6353
/** The acceleration in x. In m/s<sup>2</sup>. */

src/main/scala/org/scalajs/dom/experimental/gamepad/Gamepad.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ trait GamepadEventInit extends EventInit {
7070
var gamepad: js.UndefOr[Gamepad]
7171
}
7272

73-
object GamepadEventInit {
74-
@deprecated("Create new ClipboardEventInit instead", "0.9.8")
75-
def apply(gamepad: Gamepad): GamepadEventInit =
76-
js.Dynamic.literal("gamepad" -> gamepad).asInstanceOf[GamepadEventInit]
77-
}
78-
7973
@JSGlobal("GamepadEvent")
8074
@js.native
8175
class GamepadEvent(typeArg: String,

src/main/scala/org/scalajs/dom/experimental/mediastream/MediaStream.scala

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -467,18 +467,6 @@ trait MediaStreamTrackEventInit extends EventInit {
467467
var track: js.UndefOr[MediaStreamTrack] = js.undefined
468468
}
469469

470-
object MediaStreamTrackEventInit {
471-
@deprecated("Create new MediaStreamTrackEventInit instead", "0.9.8")
472-
@inline
473-
def apply(
474-
track: js.UndefOr[MediaStreamTrack] = js.undefined
475-
): MediaStreamTrackEventInit = {
476-
val result = js.Dynamic.literal()
477-
track.foreach(result.track = _)
478-
result.asInstanceOf[MediaStreamTrackEventInit]
479-
}
480-
}
481-
482470
@js.native
483471
@JSGlobal
484472
class MediaStreamTrackEvent(typeArg: String,

src/main/scala/org/scalajs/dom/experimental/push/PushManager.scala

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -223,23 +223,6 @@ trait PushSubscriptionOptions extends js.Object {
223223
var applicationServerKey: js.UndefOr[Uint8Array] = js.undefined
224224
}
225225

226-
/** Factory for [[PushSubscriptionOptions]] objects. */
227-
object PushSubscriptionOptions {
228-
229-
/**
230-
* Creates a new [[PushSubscriptionOptions]] object. Default value for userVisibleOnly is false.
231-
*/
232-
@deprecated(
233-
"Use new PushSubscriptionOptions { userVisibleOnly = ??? } instead",
234-
"0.9.6")
235-
def apply(
236-
permissionUserVisibleOnly: Boolean = false): PushSubscriptionOptions = {
237-
new PushSubscriptionOptions {
238-
userVisibleOnly = permissionUserVisibleOnly
239-
}
240-
}
241-
}
242-
243226
/**
244227
* This represents a JavaScript enumeration describing the state of permissions for
245228
* pushing described here: [[http://www.w3.org/TR/push-api/#idl-def-PushPermissionState]]

src/main/scala/org/scalajs/dom/experimental/serviceworkers/ServiceWorkers.scala

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -475,49 +475,6 @@ trait ServiceWorkerMessageEventInit extends EventInit {
475475
var ports: js.UndefOr[js.Array[MessagePort]] = js.undefined
476476
}
477477

478-
/**
479-
* The ServiceWorkerMessageEvent interface of the ServiceWorker API contains
480-
* information about an event sent to a ServiceWorkerContainer target.
481-
* This extends the default message event to allow setting a ServiceWorker
482-
* object as the source of a message.
483-
* The event object is accessed via the handler function of a message event,
484-
* when fired by a message received from a service worker.
485-
*
486-
* MDN
487-
*/
488-
@js.native
489-
@JSGlobal
490-
@deprecated("Instead use MessageEvent", "0.9.8")
491-
class ServiceWorkerMessageEvent(typeArg: String,
492-
init: js.UndefOr[ServiceWorkerMessageEventInit] = js.undefined)
493-
extends Event(typeArg, init) {
494-
495-
/**
496-
* Returns the event's data. It can be any data type.
497-
*/
498-
val data: Any = js.native
499-
500-
/**
501-
* Returns the origin of the service worker's environment settings object.
502-
*/
503-
val origin: String = js.native
504-
505-
/**
506-
* Represents, in server-sent events, the last event ID of the event source.
507-
*/
508-
val lastEventId: String = js.native
509-
510-
/**
511-
* @return a reference to the service worker that sent the message or `null`.
512-
*/
513-
def source: ServiceWorker | MessagePort = js.native
514-
515-
/**
516-
* It represents the MessagePort array being sent, if any.
517-
*/
518-
def ports: js.Array[MessagePort] = js.native
519-
}
520-
521478
/**
522479
* See [[https://slightlyoff.github.io/ServiceWorker/spec/service_worker_1/#service-worker-obj ¶3.1 ServiceWorker]]
523480
* of ServiceWorker whatwg spec.

0 commit comments

Comments
 (0)