Skip to content

Commit ab15696

Browse files
committed
Reformattings prompted by scalafmt.
Not setting up scalafmt in the repo per se because there are still a few "mistakes".
1 parent ccbe8c9 commit ab15696

File tree

16 files changed

+160
-124
lines changed

16 files changed

+160
-124
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,9 @@ object AesCtrParams {
552552
@inline
553553
def apply(name: String, counter: BufferSource,
554554
length: Short): AesCtrParams = {
555-
js.Dynamic.literal(name = name, counter = counter,
556-
length = length).asInstanceOf[AesCtrParams]
555+
js.Dynamic
556+
.literal(name = name, counter = counter, length = length)
557+
.asInstanceOf[AesCtrParams]
557558
}
558559
}
559560

@@ -734,8 +735,9 @@ object DhKeyGenParams {
734735
@inline
735736
def apply(name: String, prime: BigInteger,
736737
generator: BigInteger): DhKeyGenParams = {
737-
js.Dynamic.literal(name = name, prime = prime,
738-
generator = generator).asInstanceOf[DhKeyGenParams]
738+
js.Dynamic
739+
.literal(name = name, prime = prime, generator = generator)
740+
.asInstanceOf[DhKeyGenParams]
739741
}
740742
}
741743

@@ -750,8 +752,9 @@ object DhKeyAlgorithm {
750752
@inline
751753
def apply(name: String, prime: BigInteger,
752754
generator: BigInteger): DhKeyAlgorithm = {
753-
js.Dynamic.literal(name = name, prime = prime,
754-
generator = generator).asInstanceOf[DhKeyAlgorithm]
755+
js.Dynamic
756+
.literal(name = name, prime = prime, generator = generator)
757+
.asInstanceOf[DhKeyAlgorithm]
755758
}
756759
}
757760

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ object NotificationOptions {
155155
tag: js.UndefOr[String] = js.undefined,
156156
onclick: js.UndefOr[js.Function0[Any]] = js.undefined,
157157
onerror: js.UndefOr[js.Function0[Any]] = js.undefined,
158-
vibrate: js.UndefOr[js.Array[Double]] = js.undefined): NotificationOptions = {
158+
vibrate: js.UndefOr[js.Array[Double]] = js.undefined
159+
): NotificationOptions = {
159160
val result = js.Dynamic.literal()
160161
body.foreach(result.body = _)
161162
dir.foreach(result.dir = _)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ class ReadableStreamReader[+T](stream: ReadableStream[T]) extends js.Object {
274274
*
275275
* //todo determine type of reason
276276
*/
277-
def cancel(reason: Any): js.Promise[Any] = js.native //not actually sure what the return type is here
277+
// not actually sure what the return type is here
278+
def cancel(reason: Any): js.Promise[Any] = js.native
278279

279280
/**
280281
* See [[https://streams.spec.whatwg.org/#reader-read 3.4.4.3. read()]] of

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

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,91 +3,91 @@ package org.scalajs.dom.experimental
33
import scala.scalajs.js
44

55
/**
6-
* The URL() constructor returns a newly created URL object representing the URL
7-
* defined by the parameters.
8-
*
9-
* MDN
10-
*/
6+
* The URL() constructor returns a newly created URL object representing the URL
7+
* defined by the parameters.
8+
*
9+
* MDN
10+
*/
1111
@js.native
1212
class URL(url: String, base: String = js.native) extends js.Object {
1313

1414
/**
15-
* Returns a DOMString containing the origin of the URL, that is its scheme,
16-
* its domain and its port.
17-
*
18-
* MDN
19-
*/
15+
* Returns a DOMString containing the origin of the URL, that is its scheme,
16+
* its domain and its port.
17+
*
18+
* MDN
19+
*/
2020
def origin: String = js.native
2121

2222
/**
23-
* Is a DOMString containing the whole URL.
24-
*
25-
* MDN
26-
*/
23+
* Is a DOMString containing the whole URL.
24+
*
25+
* MDN
26+
*/
2727
var href: String = js.native
2828

2929
/**
30-
* Is a DOMString containing the protocol scheme of the URL,
31-
* including the final ':'.
32-
*
33-
* MDN
34-
*/
30+
* Is a DOMString containing the protocol scheme of the URL,
31+
* including the final ':'.
32+
*
33+
* MDN
34+
*/
3535
var protocol: String = js.native
3636

3737
/**
38-
* Is a DOMString containing the username specified before the domain name.
39-
*
40-
* MDN
41-
*/
38+
* Is a DOMString containing the username specified before the domain name.
39+
*
40+
* MDN
41+
*/
4242
var username: String = js.native
4343

4444
/**
45-
* Is a DOMString containing the password specified before the domain name.
46-
*
47-
* MDN
48-
*/
45+
* Is a DOMString containing the password specified before the domain name.
46+
*
47+
* MDN
48+
*/
4949
var password: String = js.native
5050

5151
/**
52-
* Is a DOMString containing the host, that is the hostname, a ':',
53-
* and the port of the URL.
54-
*
55-
* MDN
56-
*/
52+
* Is a DOMString containing the host, that is the hostname, a ':',
53+
* and the port of the URL.
54+
*
55+
* MDN
56+
*/
5757
var host: String = js.native
5858

5959
/**
60-
* Is a DOMString containing the domain of the URL.
61-
*
62-
* MDN
63-
*/
60+
* Is a DOMString containing the domain of the URL.
61+
*
62+
* MDN
63+
*/
6464
var hostname: String = js.native
6565

6666
/**
67-
* Is a DOMString containing the port number of the URL.
68-
*
69-
* MDN
70-
*/
67+
* Is a DOMString containing the port number of the URL.
68+
*
69+
* MDN
70+
*/
7171
var port: String = js.native
7272

7373
/**
74-
* Is a DOMString containing an initial '/' followed by the path of the URL.
75-
*
76-
* MDN
77-
*/
74+
* Is a DOMString containing an initial '/' followed by the path of the URL.
75+
*
76+
* MDN
77+
*/
7878
var pathname: String = js.native
7979

8080
/**
81-
* Is a DOMString containing a '?' followed by the parameters of the URL.
82-
*
83-
* MDN
84-
*/
81+
* Is a DOMString containing a '?' followed by the parameters of the URL.
82+
*
83+
* MDN
84+
*/
8585
var search: String = js.native
8686

8787
/**
88-
* Is a DOMString containing a '#' followed by the fragment identifier of the URL.
89-
*
90-
* MDN
91-
*/
88+
* Is a DOMString containing a '#' followed by the fragment identifier of the URL.
89+
*
90+
* MDN
91+
*/
9292
var hash: String = js.native
9393
}

src/main/scala/org/scalajs/dom/experimental/domparser/DOMParser.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import org.scalajs.dom.raw.{Document, HTMLDocument}
1212
*/
1313
@js.native
1414
class DOMParser extends js.Object {
15+
1516
/**
1617
* The DOMParser can also be used to parse a SVG document or a HTML document.
1718
* There are three different results possible, selected by the MIME type given.
@@ -21,7 +22,8 @@ class DOMParser extends js.Object {
2122
*
2223
* MDN
2324
*/
24-
def parseFromString(string: String, supportedType: SupportedType): Document = js.native
25+
def parseFromString(string: String,
26+
supportedType: SupportedType): Document = js.native
2527
}
2628

2729
@js.native
@@ -31,6 +33,7 @@ object SupportedType {
3133
val `text/html` = "text/html".asInstanceOf[SupportedType]
3234
val `text/xml` = "text/xml".asInstanceOf[SupportedType]
3335
val `application/xml` = "application/xml".asInstanceOf[SupportedType]
34-
val `application/xhtml+xml` = "application/xhtml+xml".asInstanceOf[SupportedType]
36+
val `application/xhtml+xml` =
37+
"application/xhtml+xml".asInstanceOf[SupportedType]
3538
val `image/svg+xml` = "image/svg+xml".asInstanceOf[SupportedType]
3639
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package org.scalajs.dom.experimental
33
/**
44
* The Intl object is the namespace for the ECMAScript Internationalization API, which provides
55
* language sensitive string comparison, number formatting, and date and time formatting.
6-
*
6+
*
77
* The constructors for Collator, NumberFormat, and DateTimeFormat objects are properties of the
88
* Intl object. This page documents these properties as well as functionality common to the
99
* internationalization constructors and other language sensitive functions.

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

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ object MediaTrackConstraintSet {
348348
sampleSize: js.UndefOr[Double] = js.undefined,
349349
echoCancellation: js.UndefOr[Boolean] = js.undefined,
350350
deviceId: js.UndefOr[String] = js.undefined,
351-
groupId: js.UndefOr[String] = js.undefined): MediaTrackConstraintSet = {
351+
groupId: js.UndefOr[String] = js.undefined
352+
): MediaTrackConstraintSet = {
352353
val result = js.Dynamic.literal()
353354
width.foreach(result.width = _)
354355
height.foreach(result.height = _)
@@ -373,8 +374,8 @@ trait MediaTrackConstraints extends MediaTrackConstraintSet {
373374
object MediaTrackConstraints {
374375
@inline
375376
def apply(
376-
advanced: js.UndefOr[js.Array[MediaTrackConstraintSet]] =
377-
js.undefined): MediaTrackConstraints = {
377+
advanced: js.UndefOr[js.Array[MediaTrackConstraintSet]] = js.undefined
378+
): MediaTrackConstraints = {
378379
val result = js.Dynamic.literal()
379380
advanced.foreach(result.advanced = _)
380381
result.asInstanceOf[MediaTrackConstraints]
@@ -393,7 +394,8 @@ object SourceInfo {
393394
def apply(
394395
sourceId: js.UndefOr[Boolean] = js.undefined,
395396
kind: js.UndefOr[String] = js.undefined,
396-
label: js.UndefOr[String] = js.undefined): SourceInfo = {
397+
label: js.UndefOr[String] = js.undefined
398+
): SourceInfo = {
397399
val result = js.Dynamic.literal()
398400
sourceId.foreach(result.sourceId = _)
399401
kind.foreach(result.kind = _)
@@ -418,7 +420,8 @@ object MediaStreamTrack {
418420
onmute: js.UndefOr[js.Function0[Any]] = js.undefined,
419421
onunmute: js.UndefOr[js.Function0[Any]] = js.undefined,
420422
onoverconstrained: js.UndefOr[js.Function0[Any]] = js.undefined,
421-
oneended: js.UndefOr[js.Function0[Any]] = js.undefined): MediaStreamTrack = {
423+
oneended: js.UndefOr[js.Function0[Any]] = js.undefined
424+
): MediaStreamTrack = {
422425
val result = js.Dynamic.literal()
423426
enabled.foreach(result.enabled = _)
424427
id.foreach(result.id = _)
@@ -449,7 +452,8 @@ object MediaStreamConstraints {
449452
def apply(
450453
video: js.UndefOr[Boolean | MediaTrackConstraints] = js.undefined,
451454
audio: js.UndefOr[Boolean | MediaTrackConstraints] = js.undefined,
452-
peerIdentity: js.UndefOr[String] = js.undefined): MediaStreamConstraints = {
455+
peerIdentity: js.UndefOr[String] = js.undefined
456+
): MediaStreamConstraints = {
453457
val result = js.Dynamic.literal()
454458
video.foreach(v => result.video = v.asInstanceOf[js.Any])
455459
audio.foreach(a => result.audio = a.asInstanceOf[js.Any])
@@ -466,8 +470,8 @@ trait MediaStreamTrackEventInit extends js.Object {
466470
object MediaStreamTrackEventInit {
467471
@inline
468472
def apply(
469-
track: js.UndefOr[MediaStreamTrack] =
470-
js.undefined): MediaStreamTrackEventInit = {
473+
track: js.UndefOr[MediaStreamTrack] = js.undefined
474+
): MediaStreamTrackEventInit = {
471475
val result = js.Dynamic.literal()
472476
track.foreach(result.track = _)
473477
result.asInstanceOf[MediaStreamTrackEventInit]
@@ -550,7 +554,8 @@ object MediaDevicesInfo {
550554
deviceId: js.UndefOr[String] = js.undefined,
551555
groupId: js.UndefOr[String] = js.undefined,
552556
kind: js.UndefOr[String] = js.undefined,
553-
label: js.UndefOr[String] = js.undefined): MediaDevicesInfo = {
557+
label: js.UndefOr[String] = js.undefined
558+
): MediaDevicesInfo = {
554559
val result = js.Dynamic.literal()
555560
deviceId.foreach(result.deviceId = _)
556561
groupId.foreach(result.groupId = _)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ trait PushManager extends js.Object {
4040
*
4141
* MDN
4242
*/
43-
def permissionState(options: PushSubscriptionOptions = js.native): js.Promise[PushPermissionState] = js.native
43+
def permissionState(
44+
options: PushSubscriptionOptions = js.native): js.Promise[PushPermissionState] = js.native
4445

4546
/**
4647
* The subscribe() method of the PushManager interface subscribes to a push service.
@@ -51,7 +52,8 @@ trait PushManager extends js.Object {
5152
*
5253
* MDN
5354
*/
54-
def subscribe(options: PushSubscriptionOptions = js.native): js.Promise[PushSubscription] = js.native
55+
def subscribe(
56+
options: PushSubscriptionOptions = js.native): js.Promise[PushSubscription] = js.native
5557
}
5658

5759
/**

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ package org.scalajs.dom.experimental
22

33
import scala.language.implicitConversions
44

5-
import org.scalajs.dom.experimental.serviceworkers.{ServiceWorkerGlobalScope, ServiceWorkerRegistration}
5+
import org.scalajs.dom.experimental.serviceworkers.{
6+
ServiceWorkerGlobalScope, ServiceWorkerRegistration
7+
}
68

79
import scala.scalajs.js
810

0 commit comments

Comments
 (0)