Skip to content

Reformattings prompted by scalafmt. #246

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

Merged
merged 1 commit into from
Oct 7, 2016
Merged
Show file tree
Hide file tree
Changes from all 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
15 changes: 9 additions & 6 deletions src/main/scala/org/scalajs/dom/crypto/Crypto.scala
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,9 @@ object AesCtrParams {
@inline
def apply(name: String, counter: BufferSource,
length: Short): AesCtrParams = {
js.Dynamic.literal(name = name, counter = counter,
length = length).asInstanceOf[AesCtrParams]
js.Dynamic
.literal(name = name, counter = counter, length = length)
.asInstanceOf[AesCtrParams]
}
}

Expand Down Expand Up @@ -734,8 +735,9 @@ object DhKeyGenParams {
@inline
def apply(name: String, prime: BigInteger,
generator: BigInteger): DhKeyGenParams = {
js.Dynamic.literal(name = name, prime = prime,
generator = generator).asInstanceOf[DhKeyGenParams]
js.Dynamic
.literal(name = name, prime = prime, generator = generator)
.asInstanceOf[DhKeyGenParams]
}
}

Expand All @@ -750,8 +752,9 @@ object DhKeyAlgorithm {
@inline
def apply(name: String, prime: BigInteger,
generator: BigInteger): DhKeyAlgorithm = {
js.Dynamic.literal(name = name, prime = prime,
generator = generator).asInstanceOf[DhKeyAlgorithm]
js.Dynamic
.literal(name = name, prime = prime, generator = generator)
.asInstanceOf[DhKeyAlgorithm]
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ object NotificationOptions {
tag: js.UndefOr[String] = js.undefined,
onclick: js.UndefOr[js.Function0[Any]] = js.undefined,
onerror: js.UndefOr[js.Function0[Any]] = js.undefined,
vibrate: js.UndefOr[js.Array[Double]] = js.undefined): NotificationOptions = {
vibrate: js.UndefOr[js.Array[Double]] = js.undefined
): NotificationOptions = {
val result = js.Dynamic.literal()
body.foreach(result.body = _)
dir.foreach(result.dir = _)
Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/org/scalajs/dom/experimental/Stream.scala
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ class ReadableStreamReader[+T](stream: ReadableStream[T]) extends js.Object {
*
* //todo determine type of reason
*/
def cancel(reason: Any): js.Promise[Any] = js.native //not actually sure what the return type is here
// not actually sure what the return type is here
def cancel(reason: Any): js.Promise[Any] = js.native

/**
* See [[https://streams.spec.whatwg.org/#reader-read 3.4.4.3. read()]] of
Expand Down
104 changes: 52 additions & 52 deletions src/main/scala/org/scalajs/dom/experimental/URL.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,91 +3,91 @@ package org.scalajs.dom.experimental
import scala.scalajs.js

/**
* The URL() constructor returns a newly created URL object representing the URL
* defined by the parameters.
*
* MDN
*/
* The URL() constructor returns a newly created URL object representing the URL
* defined by the parameters.
*
* MDN
*/
@js.native
class URL(url: String, base: String = js.native) extends js.Object {

/**
* Returns a DOMString containing the origin of the URL, that is its scheme,
* its domain and its port.
*
* MDN
*/
* Returns a DOMString containing the origin of the URL, that is its scheme,
* its domain and its port.
*
* MDN
*/
def origin: String = js.native

/**
* Is a DOMString containing the whole URL.
*
* MDN
*/
* Is a DOMString containing the whole URL.
*
* MDN
*/
var href: String = js.native

/**
* Is a DOMString containing the protocol scheme of the URL,
* including the final ':'.
*
* MDN
*/
* Is a DOMString containing the protocol scheme of the URL,
* including the final ':'.
*
* MDN
*/
var protocol: String = js.native

/**
* Is a DOMString containing the username specified before the domain name.
*
* MDN
*/
* Is a DOMString containing the username specified before the domain name.
*
* MDN
*/
var username: String = js.native

/**
* Is a DOMString containing the password specified before the domain name.
*
* MDN
*/
* Is a DOMString containing the password specified before the domain name.
*
* MDN
*/
var password: String = js.native

/**
* Is a DOMString containing the host, that is the hostname, a ':',
* and the port of the URL.
*
* MDN
*/
* Is a DOMString containing the host, that is the hostname, a ':',
* and the port of the URL.
*
* MDN
*/
var host: String = js.native

/**
* Is a DOMString containing the domain of the URL.
*
* MDN
*/
* Is a DOMString containing the domain of the URL.
*
* MDN
*/
var hostname: String = js.native

/**
* Is a DOMString containing the port number of the URL.
*
* MDN
*/
* Is a DOMString containing the port number of the URL.
*
* MDN
*/
var port: String = js.native

/**
* Is a DOMString containing an initial '/' followed by the path of the URL.
*
* MDN
*/
* Is a DOMString containing an initial '/' followed by the path of the URL.
*
* MDN
*/
var pathname: String = js.native

/**
* Is a DOMString containing a '?' followed by the parameters of the URL.
*
* MDN
*/
* Is a DOMString containing a '?' followed by the parameters of the URL.
*
* MDN
*/
var search: String = js.native

/**
* Is a DOMString containing a '#' followed by the fragment identifier of the URL.
*
* MDN
*/
* Is a DOMString containing a '#' followed by the fragment identifier of the URL.
*
* MDN
*/
var hash: String = js.native
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import org.scalajs.dom.raw.{Document, HTMLDocument}
*/
@js.native
class DOMParser extends js.Object {

/**
* The DOMParser can also be used to parse a SVG document or a HTML document.
* There are three different results possible, selected by the MIME type given.
Expand All @@ -21,7 +22,8 @@ class DOMParser extends js.Object {
*
* MDN
*/
def parseFromString(string: String, supportedType: SupportedType): Document = js.native
def parseFromString(string: String,
supportedType: SupportedType): Document = js.native
}

@js.native
Expand All @@ -31,6 +33,7 @@ object SupportedType {
val `text/html` = "text/html".asInstanceOf[SupportedType]
val `text/xml` = "text/xml".asInstanceOf[SupportedType]
val `application/xml` = "application/xml".asInstanceOf[SupportedType]
val `application/xhtml+xml` = "application/xhtml+xml".asInstanceOf[SupportedType]
val `application/xhtml+xml` =
"application/xhtml+xml".asInstanceOf[SupportedType]
val `image/svg+xml` = "image/svg+xml".asInstanceOf[SupportedType]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.scalajs.dom.experimental
/**
* The Intl object is the namespace for the ECMAScript Internationalization API, which provides
* language sensitive string comparison, number formatting, and date and time formatting.
*
*
* The constructors for Collator, NumberFormat, and DateTimeFormat objects are properties of the
* Intl object. This page documents these properties as well as functionality common to the
* internationalization constructors and other language sensitive functions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ object MediaTrackConstraintSet {
sampleSize: js.UndefOr[Double] = js.undefined,
echoCancellation: js.UndefOr[Boolean] = js.undefined,
deviceId: js.UndefOr[String] = js.undefined,
groupId: js.UndefOr[String] = js.undefined): MediaTrackConstraintSet = {
groupId: js.UndefOr[String] = js.undefined
): MediaTrackConstraintSet = {
val result = js.Dynamic.literal()
width.foreach(result.width = _)
height.foreach(result.height = _)
Expand All @@ -373,8 +374,8 @@ trait MediaTrackConstraints extends MediaTrackConstraintSet {
object MediaTrackConstraints {
@inline
def apply(
advanced: js.UndefOr[js.Array[MediaTrackConstraintSet]] =
js.undefined): MediaTrackConstraints = {
advanced: js.UndefOr[js.Array[MediaTrackConstraintSet]] = js.undefined
): MediaTrackConstraints = {
val result = js.Dynamic.literal()
advanced.foreach(result.advanced = _)
result.asInstanceOf[MediaTrackConstraints]
Expand All @@ -393,7 +394,8 @@ object SourceInfo {
def apply(
sourceId: js.UndefOr[Boolean] = js.undefined,
kind: js.UndefOr[String] = js.undefined,
label: js.UndefOr[String] = js.undefined): SourceInfo = {
label: js.UndefOr[String] = js.undefined
): SourceInfo = {
val result = js.Dynamic.literal()
sourceId.foreach(result.sourceId = _)
kind.foreach(result.kind = _)
Expand All @@ -418,7 +420,8 @@ object MediaStreamTrack {
onmute: js.UndefOr[js.Function0[Any]] = js.undefined,
onunmute: js.UndefOr[js.Function0[Any]] = js.undefined,
onoverconstrained: js.UndefOr[js.Function0[Any]] = js.undefined,
oneended: js.UndefOr[js.Function0[Any]] = js.undefined): MediaStreamTrack = {
oneended: js.UndefOr[js.Function0[Any]] = js.undefined
): MediaStreamTrack = {
val result = js.Dynamic.literal()
enabled.foreach(result.enabled = _)
id.foreach(result.id = _)
Expand Down Expand Up @@ -449,7 +452,8 @@ object MediaStreamConstraints {
def apply(
video: js.UndefOr[Boolean | MediaTrackConstraints] = js.undefined,
audio: js.UndefOr[Boolean | MediaTrackConstraints] = js.undefined,
peerIdentity: js.UndefOr[String] = js.undefined): MediaStreamConstraints = {
peerIdentity: js.UndefOr[String] = js.undefined
): MediaStreamConstraints = {
val result = js.Dynamic.literal()
video.foreach(v => result.video = v.asInstanceOf[js.Any])
audio.foreach(a => result.audio = a.asInstanceOf[js.Any])
Expand All @@ -466,8 +470,8 @@ trait MediaStreamTrackEventInit extends js.Object {
object MediaStreamTrackEventInit {
@inline
def apply(
track: js.UndefOr[MediaStreamTrack] =
js.undefined): MediaStreamTrackEventInit = {
track: js.UndefOr[MediaStreamTrack] = js.undefined
): MediaStreamTrackEventInit = {
val result = js.Dynamic.literal()
track.foreach(result.track = _)
result.asInstanceOf[MediaStreamTrackEventInit]
Expand Down Expand Up @@ -550,7 +554,8 @@ object MediaDevicesInfo {
deviceId: js.UndefOr[String] = js.undefined,
groupId: js.UndefOr[String] = js.undefined,
kind: js.UndefOr[String] = js.undefined,
label: js.UndefOr[String] = js.undefined): MediaDevicesInfo = {
label: js.UndefOr[String] = js.undefined
): MediaDevicesInfo = {
val result = js.Dynamic.literal()
deviceId.foreach(result.deviceId = _)
groupId.foreach(result.groupId = _)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ trait PushManager extends js.Object {
*
* MDN
*/
def permissionState(options: PushSubscriptionOptions = js.native): js.Promise[PushPermissionState] = js.native
def permissionState(
options: PushSubscriptionOptions = js.native): js.Promise[PushPermissionState] = js.native

/**
* The subscribe() method of the PushManager interface subscribes to a push service.
Expand All @@ -51,7 +52,8 @@ trait PushManager extends js.Object {
*
* MDN
*/
def subscribe(options: PushSubscriptionOptions = js.native): js.Promise[PushSubscription] = js.native
def subscribe(
options: PushSubscriptionOptions = js.native): js.Promise[PushSubscription] = js.native
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package org.scalajs.dom.experimental

import scala.language.implicitConversions

import org.scalajs.dom.experimental.serviceworkers.{ServiceWorkerGlobalScope, ServiceWorkerRegistration}
import org.scalajs.dom.experimental.serviceworkers.{
ServiceWorkerGlobalScope, ServiceWorkerRegistration
}

import scala.scalajs.js

Expand Down
Loading