From c47ab79ecb4511bb05f4c0d5c3f0814c9236fd9d Mon Sep 17 00:00:00 2001 From: David Barri Date: Sat, 4 Sep 2021 14:37:27 +1000 Subject: [PATCH] Enable ExplicitResultTypes --- .scalafix.conf | 1 + api-reports/2_12.txt | 272 +++++++++--------- api-reports/2_13.txt | 272 +++++++++--------- prePR.sbt | 6 +- src/main/scala/org/scalajs/dom/Fetch.scala | 76 ++--- src/main/scala/org/scalajs/dom/IDBTypes.scala | 14 +- src/main/scala/org/scalajs/dom/Stream.scala | 10 +- .../scala/org/scalajs/dom/crypto/Crypto.scala | 30 +- .../dom/experimental/gamepad/package.scala | 4 +- .../mediastream/MediaStream.scala | 10 +- .../experimental/permissions/package.scala | 14 +- .../dom/experimental/push/PushManager.scala | 10 +- .../serviceworkers/ServiceWorkers.scala | 24 +- .../dom/experimental/webrtc/WebRTC.scala | 46 +-- .../org/scalajs/dom/ext/Extensions.scala | 12 +- src/main/scala/org/scalajs/dom/lib.scala | 8 +- 16 files changed, 405 insertions(+), 404 deletions(-) diff --git a/.scalafix.conf b/.scalafix.conf index 0d0427ef9..bcfc968fe 100644 --- a/.scalafix.conf +++ b/.scalafix.conf @@ -1,4 +1,5 @@ rules = [ + ExplicitResultTypes, OrganizeImports, RemoveUnused, GenerateApiReport, diff --git a/api-reports/2_12.txt b/api-reports/2_12.txt index bec406167..d150a188d 100644 --- a/api-reports/2_12.txt +++ b/api-reports/2_12.txt @@ -13100,14 +13100,14 @@ History[JC] def replaceState(statedata: js.Any, title: String): Unit History[JC] def replaceState(statedata: js.Any, title: String, url: String): Unit History[JC] def state: js.Any HttpMethod[JT] -HttpMethod[SO] val DELETE = "DELETE".asInstanceOf[HttpMethod] -HttpMethod[SO] val GET = "GET".asInstanceOf[HttpMethod] -HttpMethod[SO] val HEAD = "HEAD".asInstanceOf[HttpMethod] -HttpMethod[SO] val OPTIONS = "OPTIONS".asInstanceOf[HttpMethod] -HttpMethod[SO] val PATCH = "PATCH".asInstanceOf[HttpMethod] -HttpMethod[SO] val POST = "POST".asInstanceOf[HttpMethod] -HttpMethod[SO] val PUT = "PUT".asInstanceOf[HttpMethod] -HttpMethod[SO] val QUERY = "QUERY".asInstanceOf[HttpMethod] +HttpMethod[SO] val DELETE: HttpMethod +HttpMethod[SO] val GET: HttpMethod +HttpMethod[SO] val HEAD: HttpMethod +HttpMethod[SO] val OPTIONS: HttpMethod +HttpMethod[SO] val PATCH: HttpMethod +HttpMethod[SO] val POST: HttpMethod +HttpMethod[SO] val PUT: HttpMethod +HttpMethod[SO] val QUERY: HttpMethod IDBCursor[JC] def advance(count: Int): Unit IDBCursor[JC] def continue(key: js.Any = ???): Unit IDBCursor[JC] def delete(): IDBRequest @@ -13117,10 +13117,10 @@ IDBCursor[JC] def primaryKey: js.Any IDBCursor[JC] def source: js.Any IDBCursor[JC] def update(value: js.Any): IDBRequest IDBCursorDirection[JT] -IDBCursorDirection[SO] val NEXT = "next".asInstanceOf[IDBCursorDirection] -IDBCursorDirection[SO] val NEXT_UNIQUE = "nextunique".asInstanceOf[IDBCursorDirection] -IDBCursorDirection[SO] val PREV = "prev".asInstanceOf[IDBCursorDirection] -IDBCursorDirection[SO] val PREV_UNIQUE = "prevunique".asInstanceOf[IDBCursorDirection] +IDBCursorDirection[SO] val NEXT: IDBCursorDirection +IDBCursorDirection[SO] val NEXT_UNIQUE: IDBCursorDirection +IDBCursorDirection[SO] val PREV: IDBCursorDirection +IDBCursorDirection[SO] val PREV_UNIQUE: IDBCursorDirection IDBCursorWithValue[JC] def advance(count: Int): Unit IDBCursorWithValue[JC] def continue(key: js.Any = ???): Unit IDBCursorWithValue[JC] def delete(): IDBRequest @@ -13226,9 +13226,9 @@ IDBTransaction[JC] var onerror: js.Function1[Event, _] IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit IDBTransactionMode[JT] -IDBTransactionMode[SO] val READ_ONLY = "readonly".asInstanceOf[IDBTransactionMode] -IDBTransactionMode[SO] val READ_WRITE = "readwrite".asInstanceOf[IDBTransactionMode] -IDBTransactionMode[SO] val VERSION_CHANGE = "versionchange".asInstanceOf[IDBTransactionMode] +IDBTransactionMode[SO] val READ_ONLY: IDBTransactionMode +IDBTransactionMode[SO] val READ_WRITE: IDBTransactionMode +IDBTransactionMode[SO] val VERSION_CHANGE: IDBTransactionMode IDBVersionChangeEvent[JC] def bubbles: Boolean IDBVersionChangeEvent[JC] def cancelBubble: Boolean IDBVersionChangeEvent[JC] def cancelable: Boolean @@ -14447,7 +14447,7 @@ ReadableStreamReader[JC] def closed: js.Promise[ReadableStreamReader[T]] ReadableStreamReader[JC] def read(): js.Promise[Chunk[T]] ReadableStreamReader[JC] def releaseLock(): Unit ReferrerPolicy[JT] -ReferrerPolicy[SO] val empty = "".asInstanceOf[ReferrerPolicy] +ReferrerPolicy[SO] val empty: ReferrerPolicy ReferrerPolicy[SO] val `no-referrer` = "no-referrer".asInstanceOf[ReferrerPolicy] ReferrerPolicy[SO] val `no-referrer-when-downgrade` = "no-referrer-when-downgrade".asInstanceOf[ReferrerPolicy] ReferrerPolicy[SO] val `origin-only` = "origin-only".asInstanceOf[ReferrerPolicy] @@ -14468,23 +14468,23 @@ Request[JC] def referrerPolicy: ReferrerPolicy Request[JC] def signal: AbortSignal Request[JC] def url: String RequestCache[JT] -RequestCache[SO] val default = "default".asInstanceOf[RequestCache] +RequestCache[SO] val default: RequestCache RequestCache[SO] val `force-cache` = "force-cache".asInstanceOf[RequestCache] RequestCache[SO] val `no-cache` = "no-cache".asInstanceOf[RequestCache] RequestCache[SO] val `no-store` = "no-store".asInstanceOf[RequestCache] RequestCache[SO] val `only-if-cached` = "only-if-cached".asInstanceOf[RequestCache] -RequestCache[SO] val reload = "reload".asInstanceOf[RequestCache] +RequestCache[SO] val reload: RequestCache RequestCredentials[JT] -RequestCredentials[SO] val include = "include".asInstanceOf[RequestCredentials] -RequestCredentials[SO] val omit = "omit".asInstanceOf[RequestCredentials] +RequestCredentials[SO] val include: RequestCredentials +RequestCredentials[SO] val omit: RequestCredentials RequestCredentials[SO] val `same-origin` = "same-origin".asInstanceOf[RequestCredentials] RequestDestination[JT] -RequestDestination[SO] val document = "document".asInstanceOf[RequestDestination] -RequestDestination[SO] val empty = "".asInstanceOf[RequestDestination] -RequestDestination[SO] val sharedworker = "sharedworker".asInstanceOf[RequestDestination] -RequestDestination[SO] val subresource = "subresource".asInstanceOf[RequestDestination] -RequestDestination[SO] val unknown = "unknown".asInstanceOf[RequestDestination] -RequestDestination[SO] val worker = "worker".asInstanceOf[RequestDestination] +RequestDestination[SO] val document: RequestDestination +RequestDestination[SO] val empty: RequestDestination +RequestDestination[SO] val sharedworker: RequestDestination +RequestDestination[SO] val subresource: RequestDestination +RequestDestination[SO] val unknown: RequestDestination +RequestDestination[SO] val worker: RequestDestination RequestInit[JT] var body: js.UndefOr[BodyInit] RequestInit[JT] var cache: js.UndefOr[RequestCache] RequestInit[JT] var credentials: js.UndefOr[RequestCredentials] @@ -14499,23 +14499,23 @@ RequestInit[JT] var referrerPolicy: js.UndefOr[ReferrerPolicy] RequestInit[JT] var signal: js.UndefOr[AbortSignal] RequestInit[JT] var window: js.UndefOr[Null] RequestMode[JT] -RequestMode[SO] val cors = "cors".asInstanceOf[RequestMode] -RequestMode[SO] val navigate = "navigate".asInstanceOf[RequestMode] +RequestMode[SO] val cors: RequestMode +RequestMode[SO] val navigate: RequestMode RequestMode[SO] val `no-cors` = "no-cors".asInstanceOf[RequestMode] RequestMode[SO] val `same-origin` = "same-origin".asInstanceOf[RequestMode] RequestRedirect[JT] -RequestRedirect[SO] val error = "error".asInstanceOf[RequestRedirect] -RequestRedirect[SO] val follow = "follow".asInstanceOf[RequestRedirect] -RequestRedirect[SO] val manual = "manual".asInstanceOf[RequestRedirect] +RequestRedirect[SO] val error: RequestRedirect +RequestRedirect[SO] val follow: RequestRedirect +RequestRedirect[SO] val manual: RequestRedirect RequestType[JT] -RequestType[SO] val audio = "audio".asInstanceOf[RequestType] -RequestType[SO] val empty = "".asInstanceOf[RequestType] -RequestType[SO] val font = "font".asInstanceOf[RequestType] -RequestType[SO] val image = "image".asInstanceOf[RequestType] -RequestType[SO] val script = "script".asInstanceOf[RequestType] -RequestType[SO] val style = "style".asInstanceOf[RequestType] -RequestType[SO] val track = "track".asInstanceOf[RequestType] -RequestType[SO] val video = "video".asInstanceOf[RequestType] +RequestType[SO] val audio: RequestType +RequestType[SO] val empty: RequestType +RequestType[SO] val font: RequestType +RequestType[SO] val image: RequestType +RequestType[SO] val script: RequestType +RequestType[SO] val style: RequestType +RequestType[SO] val track: RequestType +RequestType[SO] val video: RequestType Response[JC] def arrayBuffer(): js.Promise[ArrayBuffer] Response[JC] def blob(): js.Promise[Blob] Response[JC] val body: ReadableStream[Uint8Array] @@ -14536,12 +14536,12 @@ ResponseInit[JT] var headers: HeadersInit ResponseInit[JT] var status: Int ResponseInit[JT] var statusText: ByteString ResponseType[JT] -ResponseType[SO] val basic = "basic".asInstanceOf[ResponseType] -ResponseType[SO] val cors = "cors".asInstanceOf[ResponseType] -ResponseType[SO] val default = "default".asInstanceOf[ResponseType] -ResponseType[SO] val error = "error".asInstanceOf[ResponseType] -ResponseType[SO] val opaque = "opaque".asInstanceOf[ResponseType] -ResponseType[SO] val opaqueredirect = "opaqueredirect".asInstanceOf[ResponseType] +ResponseType[SO] val basic: ResponseType +ResponseType[SO] val cors: ResponseType +ResponseType[SO] val default: ResponseType +ResponseType[SO] val error: ResponseType +ResponseType[SO] val opaque: ResponseType +ResponseType[SO] val opaqueredirect: ResponseType SVGAElement[JC] var accessKey: String SVGAElement[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit SVGAElement[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit @@ -22334,10 +22334,10 @@ ValidityState[JT] def typeMismatch: Boolean ValidityState[JT] def valid: Boolean ValidityState[JT] def valueMissing: Boolean VisibilityState[JT] -VisibilityState[SO] val hidden = "hidden".asInstanceOf[VisibilityState] -VisibilityState[SO] val prerender = "prerender".asInstanceOf[VisibilityState] -VisibilityState[SO] val unloaded = "unloaded".asInstanceOf[VisibilityState] -VisibilityState[SO] val visible = "visible".asInstanceOf[VisibilityState] +VisibilityState[SO] val hidden: VisibilityState +VisibilityState[SO] val prerender: VisibilityState +VisibilityState[SO] val unloaded: VisibilityState +VisibilityState[SO] val visible: VisibilityState WaveShaperNode[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit WaveShaperNode[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit WaveShaperNode[JT] var channelCount: Int @@ -23152,11 +23152,11 @@ WorkerNavigator[JT] def onLine: Boolean WorkerNavigator[JT] def platform: String WorkerNavigator[JT] def userAgent: String WriteableState[JT] -WriteableState[SO] val closed = "closed".asInstanceOf[WriteableState] -WriteableState[SO] val closing = "closing".asInstanceOf[WriteableState] -WriteableState[SO] val errored = "errored".asInstanceOf[WriteableState] -WriteableState[SO] val waiting = "waiting".asInstanceOf[WriteableState] -WriteableState[SO] val writable = "writable".asInstanceOf[WriteableState] +WriteableState[SO] val closed: WriteableState +WriteableState[SO] val closing: WriteableState +WriteableState[SO] val errored: WriteableState +WriteableState[SO] val waiting: WriteableState +WriteableState[SO] val writable: WriteableState WriteableStream[JT] def abort(reason: js.UndefOr[Any] = js.undefined): js.Promise[Unit] WriteableStream[JT] def close(): js.Promise[WriteableStream[T]] WriteableStream[JT] val closed: js.Promise[WriteableStream[T]] @@ -23350,23 +23350,23 @@ crypto/JsonWebKey[JT] var x: String crypto/JsonWebKey[JT] var y: String crypto/KeyAlgorithm[JT] var name: String crypto/KeyFormat[JT] -crypto/KeyFormat[SO] val jwk = "jwk".asInstanceOf[KeyFormat] -crypto/KeyFormat[SO] val pkcs8 = "pkcs8".asInstanceOf[KeyFormat] -crypto/KeyFormat[SO] val raw = "raw".asInstanceOf[KeyFormat] -crypto/KeyFormat[SO] val spki = "spki".asInstanceOf[KeyFormat] +crypto/KeyFormat[SO] val jwk: KeyFormat +crypto/KeyFormat[SO] val pkcs8: KeyFormat +crypto/KeyFormat[SO] val raw: KeyFormat +crypto/KeyFormat[SO] val spki: KeyFormat crypto/KeyType[JT] -crypto/KeyType[SO] val `private` = "private".asInstanceOf[KeyType] -crypto/KeyType[SO] val public = "public".asInstanceOf[KeyType] -crypto/KeyType[SO] val secret = "secret".asInstanceOf[KeyType] +crypto/KeyType[SO] val `private`: KeyType +crypto/KeyType[SO] val public: KeyType +crypto/KeyType[SO] val secret: KeyType crypto/KeyUsage[JT] -crypto/KeyUsage[SO] val decrypt = "decrypt".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val deriveBits = "deriveBits".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val deriveKey = "deriveKey".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val encrypt = "encrypt".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val sign = "sign".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val unwrapKey = "unwrapKey".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val verify = "verify".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val wrapKey = "wrapKey".asInstanceOf[KeyUsage] +crypto/KeyUsage[SO] val decrypt: KeyUsage +crypto/KeyUsage[SO] val deriveBits: KeyUsage +crypto/KeyUsage[SO] val deriveKey: KeyUsage +crypto/KeyUsage[SO] val encrypt: KeyUsage +crypto/KeyUsage[SO] val sign: KeyUsage +crypto/KeyUsage[SO] val unwrapKey: KeyUsage +crypto/KeyUsage[SO] val verify: KeyUsage +crypto/KeyUsage[SO] val wrapKey: KeyUsage crypto/Pbkdf2Params[JT] var hash: HashAlgorithmIdentifier crypto/Pbkdf2Params[JT] var iterations: Double crypto/Pbkdf2Params[JT] var name: String @@ -23561,9 +23561,9 @@ experimental/gamepad/GamepadEventInit[JT] var gamepad: js.UndefOr[Gamepad] experimental/gamepad/GamepadEventInit[JT] var scoped: js.UndefOr[Boolean] experimental/gamepad/GamepadMappingType[JT] experimental/gamepad/GamepadNavigator[JT] def getGamepads(): js.Array[Gamepad] -experimental/gamepad/package[SO] final val `standard` = "standard".asInstanceOf[GamepadMappingType] +experimental/gamepad/package[SO] final val standard: GamepadMappingType experimental/gamepad/package[SO] implicit def toGamepad(navigator: dom.Navigator): GamepadNavigator -experimental/gamepad/package[SO] final val `unknown` = "".asInstanceOf[GamepadMappingType] +experimental/gamepad/package[SO] final val unknown: GamepadMappingType experimental/intl/Collator[JC] def compare(string1: String, string2: String): Double experimental/intl/Collator[JC] def resolvedOptions(): CollatorOptions experimental/intl/Collator[JC] def supportedLocalesOf(locales: String | js.Array[String], options: js.Any): js.Array[String] @@ -23627,9 +23627,9 @@ experimental/mediastream/MediaDeviceInfo[JT] val kind: MediaDeviceKind experimental/mediastream/MediaDeviceInfo[JT] val label: String experimental/mediastream/MediaDeviceInfo[SO] def apply(deviceId: js.UndefOr[String] = js.undefined, groupId: js.UndefOr[String] = js.undefined, kind: js.UndefOr[String] = js.undefined, label: js.UndefOr[String] = js.undefined): MediaDeviceInfo experimental/mediastream/MediaDeviceKind[JT] -experimental/mediastream/MediaDeviceKind[SO] val audioinput = "audioinput".asInstanceOf[MediaDeviceKind] -experimental/mediastream/MediaDeviceKind[SO] val audiooutput = "audiooutput".asInstanceOf[MediaDeviceKind] -experimental/mediastream/MediaDeviceKind[SO] val videoinput = "videoinput".asInstanceOf[MediaDeviceKind] +experimental/mediastream/MediaDeviceKind[SO] val audioinput: MediaDeviceKind +experimental/mediastream/MediaDeviceKind[SO] val audiooutput: MediaDeviceKind +experimental/mediastream/MediaDeviceKind[SO] val videoinput: MediaDeviceKind experimental/mediastream/MediaDevices[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit experimental/mediastream/MediaDevices[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit experimental/mediastream/MediaDevices[JT] def dispatchEvent(evt: Event): Boolean @@ -23722,8 +23722,8 @@ experimental/mediastream/MediaStreamTrackEventInit[JT] var composed: js.UndefOr[ experimental/mediastream/MediaStreamTrackEventInit[JT] var scoped: js.UndefOr[Boolean] experimental/mediastream/MediaStreamTrackEventInit[JT] var track: js.UndefOr[MediaStreamTrack] experimental/mediastream/MediaStreamTrackState[JT] -experimental/mediastream/MediaStreamTrackState[SO] val ended = "ended".asInstanceOf[MediaStreamTrackState] -experimental/mediastream/MediaStreamTrackState[SO] val live = "live".asInstanceOf[MediaStreamTrackState] +experimental/mediastream/MediaStreamTrackState[SO] val ended: MediaStreamTrackState +experimental/mediastream/MediaStreamTrackState[SO] val live: MediaStreamTrackState experimental/mediastream/MediaTrackConstraintSet[JT] var aspectRatio: Double experimental/mediastream/MediaTrackConstraintSet[JT] var deviceId: String experimental/mediastream/MediaTrackConstraintSet[JT] var echoCancellation: Boolean @@ -23927,19 +23927,19 @@ experimental/package.ResponseInit[SO] var status = _status (@deprecated in 2.0. experimental/package.ResponseInit[SO] var statusText = _statusText (@deprecated in 2.0.0) experimental/permissions/package[SO] def apply(permissionName: PermissionName): PermissionDescriptor experimental/permissions/package[SO] def apply(permissionUserVisibleOnly: Boolean): PushPermissionDescriptor -experimental/permissions/package[SO] val denied = "denied".asInstanceOf[PermissionState] -experimental/permissions/package[SO] val geolocation = "geolocation".asInstanceOf[PermissionName] -experimental/permissions/package[SO] val granted = "granted".asInstanceOf[PermissionState] -experimental/permissions/package[SO] val midi = "midi".asInstanceOf[PermissionName] +experimental/permissions/package[SO] val denied: PermissionState +experimental/permissions/package[SO] val geolocation: PermissionName +experimental/permissions/package[SO] val granted: PermissionState +experimental/permissions/package[SO] val midi: PermissionName experimental/permissions/package[SO] val name = PermissionName.push experimental/permissions/package[SO] val name = permissionName experimental/permissions/package[SO] val name: PermissionName -experimental/permissions/package[SO] val notifications = "notifications".asInstanceOf[PermissionName] +experimental/permissions/package[SO] val notifications: PermissionName experimental/permissions/package[SO] var onchange: js.Function1[dom.Event, _] experimental/permissions/package[SO] val permissions: Permissions experimental/permissions/package[SO] val `persistent-storage` = "persistent-storage".asInstanceOf[PermissionName] -experimental/permissions/package[SO] val prompt = "prompt".asInstanceOf[PermissionState] -experimental/permissions/package[SO] val push = "push".asInstanceOf[PermissionName] +experimental/permissions/package[SO] val prompt: PermissionState +experimental/permissions/package[SO] val push: PermissionName experimental/permissions/package[SO] def query(permissionDescriptor: PermissionDescriptor): js.Promise[PermissionStatus] experimental/permissions/package[SO] val state: PermissionState experimental/permissions/package[SO] implicit def toPermissions(navigator: dom.Navigator): PermissionsNavigator @@ -23949,15 +23949,15 @@ experimental/permissions/package.PermissionDescriptor[JT] val name: PermissionNa experimental/permissions/package.PermissionDescriptor[SO] def apply(permissionName: PermissionName): PermissionDescriptor experimental/permissions/package.PermissionDescriptor[SO] val name = permissionName experimental/permissions/package.PermissionName[JT] -experimental/permissions/package.PermissionName[SO] val geolocation = "geolocation".asInstanceOf[PermissionName] -experimental/permissions/package.PermissionName[SO] val midi = "midi".asInstanceOf[PermissionName] -experimental/permissions/package.PermissionName[SO] val notifications = "notifications".asInstanceOf[PermissionName] +experimental/permissions/package.PermissionName[SO] val geolocation: PermissionName +experimental/permissions/package.PermissionName[SO] val midi: PermissionName +experimental/permissions/package.PermissionName[SO] val notifications: PermissionName experimental/permissions/package.PermissionName[SO] val `persistent-storage` = "persistent-storage".asInstanceOf[PermissionName] -experimental/permissions/package.PermissionName[SO] val push = "push".asInstanceOf[PermissionName] +experimental/permissions/package.PermissionName[SO] val push: PermissionName experimental/permissions/package.PermissionState[JT] -experimental/permissions/package.PermissionState[SO] val denied = "denied".asInstanceOf[PermissionState] -experimental/permissions/package.PermissionState[SO] val granted = "granted".asInstanceOf[PermissionState] -experimental/permissions/package.PermissionState[SO] val prompt = "prompt".asInstanceOf[PermissionState] +experimental/permissions/package.PermissionState[SO] val denied: PermissionState +experimental/permissions/package.PermissionState[SO] val granted: PermissionState +experimental/permissions/package.PermissionState[SO] val prompt: PermissionState experimental/permissions/package.PermissionStatus[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit experimental/permissions/package.PermissionStatus[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit experimental/permissions/package.PermissionStatus[JT] def dispatchEvent(evt: Event): Boolean @@ -23973,8 +23973,8 @@ experimental/permissions/package.PushPermissionDescriptor[SO] def apply(permissi experimental/permissions/package.PushPermissionDescriptor[SO] val name = PermissionName.push experimental/permissions/package.PushPermissionDescriptor[SO] val userVisibleOnly = permissionUserVisibleOnly experimental/push/PushEncryptionKeyName[JT] -experimental/push/PushEncryptionKeyName[SO] val auth = "auth".asInstanceOf[PushEncryptionKeyName] -experimental/push/PushEncryptionKeyName[SO] val p256dh = "p256dh".asInstanceOf[PushEncryptionKeyName] +experimental/push/PushEncryptionKeyName[SO] val auth: PushEncryptionKeyName +experimental/push/PushEncryptionKeyName[SO] val p256dh: PushEncryptionKeyName experimental/push/PushEvent[JT] def bubbles: Boolean experimental/push/PushEvent[JT] def cancelBubble: Boolean experimental/push/PushEvent[JT] def cancelable: Boolean @@ -23998,9 +23998,9 @@ experimental/push/PushMessageData[JT] def blob(): Blob experimental/push/PushMessageData[JT] def json(): js.Any experimental/push/PushMessageData[JT] def text(): String experimental/push/PushPermissionState[JT] -experimental/push/PushPermissionState[SO] val denied = "denied".asInstanceOf[PushPermissionState] -experimental/push/PushPermissionState[SO] val granted = "granted".asInstanceOf[PushPermissionState] -experimental/push/PushPermissionState[SO] val prompt = "prompt".asInstanceOf[PushPermissionState] +experimental/push/PushPermissionState[SO] val denied: PushPermissionState +experimental/push/PushPermissionState[SO] val granted: PushPermissionState +experimental/push/PushPermissionState[SO] val prompt: PushPermissionState experimental/push/PushSubscription[JT] val endpoint: String experimental/push/PushSubscription[JT] val expirationTime: java.lang.Double experimental/push/PushSubscription[JT] def getKey(name: PushEncryptionKeyName): ArrayBuffer @@ -24044,10 +24044,10 @@ experimental/serviceworkers/Client[JT] def url: String experimental/serviceworkers/ClientQueryOptions[JT] var includeUncontrolled: Boolean experimental/serviceworkers/ClientQueryOptions[JT] var `type`: ClientType experimental/serviceworkers/ClientType[JT] -experimental/serviceworkers/ClientType[SO] val all = "all".asInstanceOf[ClientType] -experimental/serviceworkers/ClientType[SO] val sharedworker = "sharedworker".asInstanceOf[ClientType] -experimental/serviceworkers/ClientType[SO] val window = "window".asInstanceOf[ClientType] -experimental/serviceworkers/ClientType[SO] val worker = "worker".asInstanceOf[ClientType] +experimental/serviceworkers/ClientType[SO] val all: ClientType +experimental/serviceworkers/ClientType[SO] val sharedworker: ClientType +experimental/serviceworkers/ClientType[SO] val window: ClientType +experimental/serviceworkers/ClientType[SO] val worker: ClientType experimental/serviceworkers/Clients[JT] def claim(): js.Promise[Unit] experimental/serviceworkers/Clients[JT] def get(id: String): js.Promise[js.UndefOr[Client]] experimental/serviceworkers/Clients[JT] def matchAll(options: js.UndefOr[ClientQueryOptions]?): js.Promise[js.Array[Client]] @@ -24127,9 +24127,9 @@ experimental/serviceworkers/FetchEventInit[JT] var isReload: js.UndefOr[Boolean] experimental/serviceworkers/FetchEventInit[JT] var request: js.UndefOr[Request] experimental/serviceworkers/FetchEventInit[JT] var scoped: js.UndefOr[Boolean] experimental/serviceworkers/FrameType[JT] -experimental/serviceworkers/FrameType[SO] val auxiliary = "auxiliary".asInstanceOf[FrameType] -experimental/serviceworkers/FrameType[SO] val nested = "nested".asInstanceOf[FrameType] -experimental/serviceworkers/FrameType[SO] val none = "none".asInstanceOf[FrameType] +experimental/serviceworkers/FrameType[SO] val auxiliary: FrameType +experimental/serviceworkers/FrameType[SO] val nested: FrameType +experimental/serviceworkers/FrameType[SO] val none: FrameType experimental/serviceworkers/FrameType[SO] val `top-level` = "top-level".asInstanceOf[FrameType] experimental/serviceworkers/GetNotificationOptions[JT] var tag: js.UndefOr[String] experimental/serviceworkers/ServiceWorker[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit @@ -24216,11 +24216,11 @@ experimental/serviceworkers/ServiceWorkerRegistration[JT] def unregister(): js.P experimental/serviceworkers/ServiceWorkerRegistration[JT] def update(): js.Promise[Unit] experimental/serviceworkers/ServiceWorkerRegistration[JT] var waiting: ServiceWorker experimental/serviceworkers/ServiceWorkerState[JT] -experimental/serviceworkers/ServiceWorkerState[SO] val activated = "activated".asInstanceOf[ServiceWorkerState] -experimental/serviceworkers/ServiceWorkerState[SO] val activating = "activating".asInstanceOf[ServiceWorkerState] -experimental/serviceworkers/ServiceWorkerState[SO] val installed = "installed".asInstanceOf[ServiceWorkerState] -experimental/serviceworkers/ServiceWorkerState[SO] val installing = "installing".asInstanceOf[ServiceWorkerState] -experimental/serviceworkers/ServiceWorkerState[SO] val redundant = "redundant".asInstanceOf[ServiceWorkerState] +experimental/serviceworkers/ServiceWorkerState[SO] val activated: ServiceWorkerState +experimental/serviceworkers/ServiceWorkerState[SO] val activating: ServiceWorkerState +experimental/serviceworkers/ServiceWorkerState[SO] val installed: ServiceWorkerState +experimental/serviceworkers/ServiceWorkerState[SO] val installing: ServiceWorkerState +experimental/serviceworkers/ServiceWorkerState[SO] val redundant: ServiceWorkerState experimental/serviceworkers/WindowClient[JT] def focus(): js.Promise[WindowClient] experimental/serviceworkers/WindowClient[JT] def focused: Boolean experimental/serviceworkers/WindowClient[JT] def frameType: FrameType @@ -24424,7 +24424,7 @@ experimental/webrtc/MediaStreamEventInit[JT] var composed: js.UndefOr[Boolean] experimental/webrtc/MediaStreamEventInit[JT] var scoped: js.UndefOr[Boolean] experimental/webrtc/MediaStreamEventInit[JT] var stream: js.UndefOr[MediaStream] experimental/webrtc/RTCBundlePolicy[JT] -experimental/webrtc/RTCBundlePolicy[SO] val balanced = "balanced".asInstanceOf[RTCBundlePolicy] +experimental/webrtc/RTCBundlePolicy[SO] val balanced: RTCBundlePolicy experimental/webrtc/RTCBundlePolicy[SO] val `max-bundle` = "max-bundle".asInstanceOf[RTCBundlePolicy] experimental/webrtc/RTCBundlePolicy[SO] val `max-compat` = "max-compat".asInstanceOf[RTCBundlePolicy] experimental/webrtc/RTCConfiguration[JT] var bundlePolicy: RTCBundlePolicy @@ -24487,10 +24487,10 @@ experimental/webrtc/RTCDataChannelInit[JT] var ordered: Boolean experimental/webrtc/RTCDataChannelInit[JT] var protocol: String experimental/webrtc/RTCDataChannelInit[SO] def apply(ordered: js.UndefOr[Boolean] = js.undefined, maxPacketLifeTime: js.UndefOr[Double] = js.undefined, maxRetransmits: js.UndefOr[Double] = js.undefined, protocol: js.UndefOr[String] = js.undefined, negotiated: js.UndefOr[Boolean] = js.undefined, id: js.UndefOr[Double] = js.undefined): RTCDataChannelInit experimental/webrtc/RTCDataChannelState[JT] -experimental/webrtc/RTCDataChannelState[SO] val closed = "closed".asInstanceOf[RTCDataChannelState] -experimental/webrtc/RTCDataChannelState[SO] val closing = "closing".asInstanceOf[RTCDataChannelState] -experimental/webrtc/RTCDataChannelState[SO] val connecting = "connecting".asInstanceOf[RTCDataChannelState] -experimental/webrtc/RTCDataChannelState[SO] val open = "open".asInstanceOf[RTCDataChannelState] +experimental/webrtc/RTCDataChannelState[SO] val closed: RTCDataChannelState +experimental/webrtc/RTCDataChannelState[SO] val closing: RTCDataChannelState +experimental/webrtc/RTCDataChannelState[SO] val connecting: RTCDataChannelState +experimental/webrtc/RTCDataChannelState[SO] val open: RTCDataChannelState experimental/webrtc/RTCIceCandidate[JC] var candidate: String experimental/webrtc/RTCIceCandidate[JC] var sdpMLineIndex: Double experimental/webrtc/RTCIceCandidate[JC] var sdpMid: String @@ -24499,25 +24499,25 @@ experimental/webrtc/RTCIceCandidateInit[JT] var sdpMLineIndex: Double experimental/webrtc/RTCIceCandidateInit[JT] var sdpMid: String experimental/webrtc/RTCIceCandidateInit[SO] def apply(candidate: js.UndefOr[String] = js.undefined, sdpMid: js.UndefOr[String] = js.undefined, sdpMLineIndex: js.UndefOr[Double] = js.undefined): RTCIceCandidateInit experimental/webrtc/RTCIceConnectionState[JT] -experimental/webrtc/RTCIceConnectionState[SO] val checking = "checking".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val closed = "closed".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val completed = "completed".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val connected = "connected".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val disconnected = "disconnected".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val failed = "failed".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val `new` = "new".asInstanceOf[RTCIceConnectionState] +experimental/webrtc/RTCIceConnectionState[SO] val checking: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val closed: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val completed: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val connected: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val disconnected: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val failed: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val `new`: RTCIceConnectionState experimental/webrtc/RTCIceGatheringState[JT] -experimental/webrtc/RTCIceGatheringState[SO] val complete = "complete".asInstanceOf[RTCIceGatheringState] -experimental/webrtc/RTCIceGatheringState[SO] val gathering = "gathering".asInstanceOf[RTCIceGatheringState] -experimental/webrtc/RTCIceGatheringState[SO] val `new` = "new".asInstanceOf[RTCIceGatheringState] +experimental/webrtc/RTCIceGatheringState[SO] val complete: RTCIceGatheringState +experimental/webrtc/RTCIceGatheringState[SO] val gathering: RTCIceGatheringState +experimental/webrtc/RTCIceGatheringState[SO] val `new`: RTCIceGatheringState experimental/webrtc/RTCIceServer[JT] var credential: String experimental/webrtc/RTCIceServer[JT] var urls: String | js.Array[String] experimental/webrtc/RTCIceServer[JT] var username: String experimental/webrtc/RTCIceServer[SO] def apply(urls: js.UndefOr[String | js.Array[String]] = js.undefined, username: js.UndefOr[String] = js.undefined, credential: js.UndefOr[String] = js.undefined): RTCIceServer experimental/webrtc/RTCIceTransportPolicy[JT] -experimental/webrtc/RTCIceTransportPolicy[SO] val all = "all".asInstanceOf[RTCIceTransportPolicy] -experimental/webrtc/RTCIceTransportPolicy[SO] val none = "none".asInstanceOf[RTCIceTransportPolicy] -experimental/webrtc/RTCIceTransportPolicy[SO] val relay = "relay".asInstanceOf[RTCIceTransportPolicy] +experimental/webrtc/RTCIceTransportPolicy[SO] val all: RTCIceTransportPolicy +experimental/webrtc/RTCIceTransportPolicy[SO] val none: RTCIceTransportPolicy +experimental/webrtc/RTCIceTransportPolicy[SO] val relay: RTCIceTransportPolicy experimental/webrtc/RTCIdentityAssertion[JT] val idp: String experimental/webrtc/RTCIdentityAssertion[JT] val name: String experimental/webrtc/RTCIdentityAssertion[SO] def apply(idp: js.UndefOr[String] = js.undefined, name: js.UndefOr[String] = js.undefined): RTCIdentityAssertion @@ -24587,21 +24587,21 @@ experimental/webrtc/RTCPeerConnectionIceEventInit[JT] var candidate: js.UndefOr[ experimental/webrtc/RTCPeerConnectionIceEventInit[JT] var composed: js.UndefOr[Boolean] experimental/webrtc/RTCPeerConnectionIceEventInit[JT] var scoped: js.UndefOr[Boolean] experimental/webrtc/RTCSdpType[JT] -experimental/webrtc/RTCSdpType[SO] val answer = "answer".asInstanceOf[RTCSdpType] -experimental/webrtc/RTCSdpType[SO] val offer = "offer".asInstanceOf[RTCSdpType] -experimental/webrtc/RTCSdpType[SO] val pranswer = "pranswer".asInstanceOf[RTCSdpType] +experimental/webrtc/RTCSdpType[SO] val answer: RTCSdpType +experimental/webrtc/RTCSdpType[SO] val offer: RTCSdpType +experimental/webrtc/RTCSdpType[SO] val pranswer: RTCSdpType experimental/webrtc/RTCSessionDescription[JC] var sdp: String experimental/webrtc/RTCSessionDescription[JC] var `type`: RTCSdpType experimental/webrtc/RTCSessionDescriptionInit[JT] var sdp: String experimental/webrtc/RTCSessionDescriptionInit[JT] var `type`: RTCSdpType experimental/webrtc/RTCSessionDescriptionInit[SO] def apply(`type`: js.UndefOr[RTCSdpType] = js.undefined, sdp: js.UndefOr[String] = js.undefined): RTCSessionDescriptionInit experimental/webrtc/RTCSignalingState[JT] -experimental/webrtc/RTCSignalingState[SO] val closed = "closed".asInstanceOf[RTCSignalingState] +experimental/webrtc/RTCSignalingState[SO] val closed: RTCSignalingState experimental/webrtc/RTCSignalingState[SO] val `have-local-offer` = "have-local-offer".asInstanceOf[RTCSignalingState] experimental/webrtc/RTCSignalingState[SO] val `have-local-pranswer` = "have-local-pranswer".asInstanceOf[RTCSignalingState] experimental/webrtc/RTCSignalingState[SO] val `have-remote-offer` = "have-remote-offer".asInstanceOf[RTCSignalingState] experimental/webrtc/RTCSignalingState[SO] val `have-remote-pranswer` = "have-remote-pranswer".asInstanceOf[RTCSignalingState] -experimental/webrtc/RTCSignalingState[SO] val stable = "stable".asInstanceOf[RTCSignalingState] +experimental/webrtc/RTCSignalingState[SO] val stable: RTCSignalingState experimental/webrtc/RTCStats[JT] var id: String experimental/webrtc/RTCStats[JT] var timestamp: Double experimental/webrtc/RTCStats[JT] var `type`: RTCStatsType @@ -24616,12 +24616,12 @@ ext/Ajax[SO] def apply(method: String, url: String, data: InputData, timeout: In ext/Ajax[SO] implicit def arrayBufferView2ajax(b: ArrayBufferView): InputData (@deprecated in 2.0.0) ext/Ajax[SO] implicit def blob2ajax(b: Blob): InputData (@deprecated in 2.0.0) ext/Ajax[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData (@deprecated in 2.0.0) -ext/Ajax[SO] def delete(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = "") = { apply("DELETE", url, data, timeout, headers, withCredentials, responseType) } (@deprecated in 2.0.0) +ext/Ajax[SO] def delete(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0) ext/Ajax[SO] implicit def formdata2ajax(b: FormData): InputData (@deprecated in 2.0.0) -ext/Ajax[SO] def get(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = "") = { apply("GET", url, data, timeout, headers, withCredentials, responseType) } (@deprecated in 2.0.0) -ext/Ajax[SO] def patch(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = "") = { apply("PATCH", url, data, timeout, headers, withCredentials, responseType) } (@deprecated in 2.0.0) -ext/Ajax[SO] def post(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = "") = { apply("POST", url, data, timeout, headers, withCredentials, responseType) } (@deprecated in 2.0.0) -ext/Ajax[SO] def put(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = "") = { apply("PUT", url, data, timeout, headers, withCredentials, responseType) } (@deprecated in 2.0.0) +ext/Ajax[SO] def get(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0) +ext/Ajax[SO] def patch(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0) +ext/Ajax[SO] def post(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0) +ext/Ajax[SO] def put(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0) ext/Ajax[SO] implicit def str2ajax(s: String): InputData (@deprecated in 2.0.0) ext/Ajax.InputData[JT] ext/Ajax.InputData[SO] implicit def arrayBufferView2ajax(b: ArrayBufferView): InputData @@ -24629,7 +24629,7 @@ ext/Ajax.InputData[SO] implicit def blob2ajax(b: Blob): InputData ext/Ajax.InputData[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData ext/Ajax.InputData[SO] implicit def formdata2ajax(b: FormData): InputData ext/Ajax.InputData[SO] implicit def str2ajax(s: String): InputData -ext/AjaxException[SC] def isTimeout = xhr.status = = 0 && xhr.readyState = = 4 (@deprecated in 2.0.0) +ext/AjaxException[SC] def isTimeout: Boolean (@deprecated in 2.0.0) ext/AjaxException[SO] (@deprecated in 2.0.0) ext/package[SO] val KeyCode: dom.KeyCode.type (@deprecated in 2.0.0) ext/package[SO] val KeyLocation: dom.KeyLocation.type (@deprecated in 2.0.0) diff --git a/api-reports/2_13.txt b/api-reports/2_13.txt index bec406167..d150a188d 100644 --- a/api-reports/2_13.txt +++ b/api-reports/2_13.txt @@ -13100,14 +13100,14 @@ History[JC] def replaceState(statedata: js.Any, title: String): Unit History[JC] def replaceState(statedata: js.Any, title: String, url: String): Unit History[JC] def state: js.Any HttpMethod[JT] -HttpMethod[SO] val DELETE = "DELETE".asInstanceOf[HttpMethod] -HttpMethod[SO] val GET = "GET".asInstanceOf[HttpMethod] -HttpMethod[SO] val HEAD = "HEAD".asInstanceOf[HttpMethod] -HttpMethod[SO] val OPTIONS = "OPTIONS".asInstanceOf[HttpMethod] -HttpMethod[SO] val PATCH = "PATCH".asInstanceOf[HttpMethod] -HttpMethod[SO] val POST = "POST".asInstanceOf[HttpMethod] -HttpMethod[SO] val PUT = "PUT".asInstanceOf[HttpMethod] -HttpMethod[SO] val QUERY = "QUERY".asInstanceOf[HttpMethod] +HttpMethod[SO] val DELETE: HttpMethod +HttpMethod[SO] val GET: HttpMethod +HttpMethod[SO] val HEAD: HttpMethod +HttpMethod[SO] val OPTIONS: HttpMethod +HttpMethod[SO] val PATCH: HttpMethod +HttpMethod[SO] val POST: HttpMethod +HttpMethod[SO] val PUT: HttpMethod +HttpMethod[SO] val QUERY: HttpMethod IDBCursor[JC] def advance(count: Int): Unit IDBCursor[JC] def continue(key: js.Any = ???): Unit IDBCursor[JC] def delete(): IDBRequest @@ -13117,10 +13117,10 @@ IDBCursor[JC] def primaryKey: js.Any IDBCursor[JC] def source: js.Any IDBCursor[JC] def update(value: js.Any): IDBRequest IDBCursorDirection[JT] -IDBCursorDirection[SO] val NEXT = "next".asInstanceOf[IDBCursorDirection] -IDBCursorDirection[SO] val NEXT_UNIQUE = "nextunique".asInstanceOf[IDBCursorDirection] -IDBCursorDirection[SO] val PREV = "prev".asInstanceOf[IDBCursorDirection] -IDBCursorDirection[SO] val PREV_UNIQUE = "prevunique".asInstanceOf[IDBCursorDirection] +IDBCursorDirection[SO] val NEXT: IDBCursorDirection +IDBCursorDirection[SO] val NEXT_UNIQUE: IDBCursorDirection +IDBCursorDirection[SO] val PREV: IDBCursorDirection +IDBCursorDirection[SO] val PREV_UNIQUE: IDBCursorDirection IDBCursorWithValue[JC] def advance(count: Int): Unit IDBCursorWithValue[JC] def continue(key: js.Any = ???): Unit IDBCursorWithValue[JC] def delete(): IDBRequest @@ -13226,9 +13226,9 @@ IDBTransaction[JC] var onerror: js.Function1[Event, _] IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit IDBTransactionMode[JT] -IDBTransactionMode[SO] val READ_ONLY = "readonly".asInstanceOf[IDBTransactionMode] -IDBTransactionMode[SO] val READ_WRITE = "readwrite".asInstanceOf[IDBTransactionMode] -IDBTransactionMode[SO] val VERSION_CHANGE = "versionchange".asInstanceOf[IDBTransactionMode] +IDBTransactionMode[SO] val READ_ONLY: IDBTransactionMode +IDBTransactionMode[SO] val READ_WRITE: IDBTransactionMode +IDBTransactionMode[SO] val VERSION_CHANGE: IDBTransactionMode IDBVersionChangeEvent[JC] def bubbles: Boolean IDBVersionChangeEvent[JC] def cancelBubble: Boolean IDBVersionChangeEvent[JC] def cancelable: Boolean @@ -14447,7 +14447,7 @@ ReadableStreamReader[JC] def closed: js.Promise[ReadableStreamReader[T]] ReadableStreamReader[JC] def read(): js.Promise[Chunk[T]] ReadableStreamReader[JC] def releaseLock(): Unit ReferrerPolicy[JT] -ReferrerPolicy[SO] val empty = "".asInstanceOf[ReferrerPolicy] +ReferrerPolicy[SO] val empty: ReferrerPolicy ReferrerPolicy[SO] val `no-referrer` = "no-referrer".asInstanceOf[ReferrerPolicy] ReferrerPolicy[SO] val `no-referrer-when-downgrade` = "no-referrer-when-downgrade".asInstanceOf[ReferrerPolicy] ReferrerPolicy[SO] val `origin-only` = "origin-only".asInstanceOf[ReferrerPolicy] @@ -14468,23 +14468,23 @@ Request[JC] def referrerPolicy: ReferrerPolicy Request[JC] def signal: AbortSignal Request[JC] def url: String RequestCache[JT] -RequestCache[SO] val default = "default".asInstanceOf[RequestCache] +RequestCache[SO] val default: RequestCache RequestCache[SO] val `force-cache` = "force-cache".asInstanceOf[RequestCache] RequestCache[SO] val `no-cache` = "no-cache".asInstanceOf[RequestCache] RequestCache[SO] val `no-store` = "no-store".asInstanceOf[RequestCache] RequestCache[SO] val `only-if-cached` = "only-if-cached".asInstanceOf[RequestCache] -RequestCache[SO] val reload = "reload".asInstanceOf[RequestCache] +RequestCache[SO] val reload: RequestCache RequestCredentials[JT] -RequestCredentials[SO] val include = "include".asInstanceOf[RequestCredentials] -RequestCredentials[SO] val omit = "omit".asInstanceOf[RequestCredentials] +RequestCredentials[SO] val include: RequestCredentials +RequestCredentials[SO] val omit: RequestCredentials RequestCredentials[SO] val `same-origin` = "same-origin".asInstanceOf[RequestCredentials] RequestDestination[JT] -RequestDestination[SO] val document = "document".asInstanceOf[RequestDestination] -RequestDestination[SO] val empty = "".asInstanceOf[RequestDestination] -RequestDestination[SO] val sharedworker = "sharedworker".asInstanceOf[RequestDestination] -RequestDestination[SO] val subresource = "subresource".asInstanceOf[RequestDestination] -RequestDestination[SO] val unknown = "unknown".asInstanceOf[RequestDestination] -RequestDestination[SO] val worker = "worker".asInstanceOf[RequestDestination] +RequestDestination[SO] val document: RequestDestination +RequestDestination[SO] val empty: RequestDestination +RequestDestination[SO] val sharedworker: RequestDestination +RequestDestination[SO] val subresource: RequestDestination +RequestDestination[SO] val unknown: RequestDestination +RequestDestination[SO] val worker: RequestDestination RequestInit[JT] var body: js.UndefOr[BodyInit] RequestInit[JT] var cache: js.UndefOr[RequestCache] RequestInit[JT] var credentials: js.UndefOr[RequestCredentials] @@ -14499,23 +14499,23 @@ RequestInit[JT] var referrerPolicy: js.UndefOr[ReferrerPolicy] RequestInit[JT] var signal: js.UndefOr[AbortSignal] RequestInit[JT] var window: js.UndefOr[Null] RequestMode[JT] -RequestMode[SO] val cors = "cors".asInstanceOf[RequestMode] -RequestMode[SO] val navigate = "navigate".asInstanceOf[RequestMode] +RequestMode[SO] val cors: RequestMode +RequestMode[SO] val navigate: RequestMode RequestMode[SO] val `no-cors` = "no-cors".asInstanceOf[RequestMode] RequestMode[SO] val `same-origin` = "same-origin".asInstanceOf[RequestMode] RequestRedirect[JT] -RequestRedirect[SO] val error = "error".asInstanceOf[RequestRedirect] -RequestRedirect[SO] val follow = "follow".asInstanceOf[RequestRedirect] -RequestRedirect[SO] val manual = "manual".asInstanceOf[RequestRedirect] +RequestRedirect[SO] val error: RequestRedirect +RequestRedirect[SO] val follow: RequestRedirect +RequestRedirect[SO] val manual: RequestRedirect RequestType[JT] -RequestType[SO] val audio = "audio".asInstanceOf[RequestType] -RequestType[SO] val empty = "".asInstanceOf[RequestType] -RequestType[SO] val font = "font".asInstanceOf[RequestType] -RequestType[SO] val image = "image".asInstanceOf[RequestType] -RequestType[SO] val script = "script".asInstanceOf[RequestType] -RequestType[SO] val style = "style".asInstanceOf[RequestType] -RequestType[SO] val track = "track".asInstanceOf[RequestType] -RequestType[SO] val video = "video".asInstanceOf[RequestType] +RequestType[SO] val audio: RequestType +RequestType[SO] val empty: RequestType +RequestType[SO] val font: RequestType +RequestType[SO] val image: RequestType +RequestType[SO] val script: RequestType +RequestType[SO] val style: RequestType +RequestType[SO] val track: RequestType +RequestType[SO] val video: RequestType Response[JC] def arrayBuffer(): js.Promise[ArrayBuffer] Response[JC] def blob(): js.Promise[Blob] Response[JC] val body: ReadableStream[Uint8Array] @@ -14536,12 +14536,12 @@ ResponseInit[JT] var headers: HeadersInit ResponseInit[JT] var status: Int ResponseInit[JT] var statusText: ByteString ResponseType[JT] -ResponseType[SO] val basic = "basic".asInstanceOf[ResponseType] -ResponseType[SO] val cors = "cors".asInstanceOf[ResponseType] -ResponseType[SO] val default = "default".asInstanceOf[ResponseType] -ResponseType[SO] val error = "error".asInstanceOf[ResponseType] -ResponseType[SO] val opaque = "opaque".asInstanceOf[ResponseType] -ResponseType[SO] val opaqueredirect = "opaqueredirect".asInstanceOf[ResponseType] +ResponseType[SO] val basic: ResponseType +ResponseType[SO] val cors: ResponseType +ResponseType[SO] val default: ResponseType +ResponseType[SO] val error: ResponseType +ResponseType[SO] val opaque: ResponseType +ResponseType[SO] val opaqueredirect: ResponseType SVGAElement[JC] var accessKey: String SVGAElement[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit SVGAElement[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit @@ -22334,10 +22334,10 @@ ValidityState[JT] def typeMismatch: Boolean ValidityState[JT] def valid: Boolean ValidityState[JT] def valueMissing: Boolean VisibilityState[JT] -VisibilityState[SO] val hidden = "hidden".asInstanceOf[VisibilityState] -VisibilityState[SO] val prerender = "prerender".asInstanceOf[VisibilityState] -VisibilityState[SO] val unloaded = "unloaded".asInstanceOf[VisibilityState] -VisibilityState[SO] val visible = "visible".asInstanceOf[VisibilityState] +VisibilityState[SO] val hidden: VisibilityState +VisibilityState[SO] val prerender: VisibilityState +VisibilityState[SO] val unloaded: VisibilityState +VisibilityState[SO] val visible: VisibilityState WaveShaperNode[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit WaveShaperNode[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit WaveShaperNode[JT] var channelCount: Int @@ -23152,11 +23152,11 @@ WorkerNavigator[JT] def onLine: Boolean WorkerNavigator[JT] def platform: String WorkerNavigator[JT] def userAgent: String WriteableState[JT] -WriteableState[SO] val closed = "closed".asInstanceOf[WriteableState] -WriteableState[SO] val closing = "closing".asInstanceOf[WriteableState] -WriteableState[SO] val errored = "errored".asInstanceOf[WriteableState] -WriteableState[SO] val waiting = "waiting".asInstanceOf[WriteableState] -WriteableState[SO] val writable = "writable".asInstanceOf[WriteableState] +WriteableState[SO] val closed: WriteableState +WriteableState[SO] val closing: WriteableState +WriteableState[SO] val errored: WriteableState +WriteableState[SO] val waiting: WriteableState +WriteableState[SO] val writable: WriteableState WriteableStream[JT] def abort(reason: js.UndefOr[Any] = js.undefined): js.Promise[Unit] WriteableStream[JT] def close(): js.Promise[WriteableStream[T]] WriteableStream[JT] val closed: js.Promise[WriteableStream[T]] @@ -23350,23 +23350,23 @@ crypto/JsonWebKey[JT] var x: String crypto/JsonWebKey[JT] var y: String crypto/KeyAlgorithm[JT] var name: String crypto/KeyFormat[JT] -crypto/KeyFormat[SO] val jwk = "jwk".asInstanceOf[KeyFormat] -crypto/KeyFormat[SO] val pkcs8 = "pkcs8".asInstanceOf[KeyFormat] -crypto/KeyFormat[SO] val raw = "raw".asInstanceOf[KeyFormat] -crypto/KeyFormat[SO] val spki = "spki".asInstanceOf[KeyFormat] +crypto/KeyFormat[SO] val jwk: KeyFormat +crypto/KeyFormat[SO] val pkcs8: KeyFormat +crypto/KeyFormat[SO] val raw: KeyFormat +crypto/KeyFormat[SO] val spki: KeyFormat crypto/KeyType[JT] -crypto/KeyType[SO] val `private` = "private".asInstanceOf[KeyType] -crypto/KeyType[SO] val public = "public".asInstanceOf[KeyType] -crypto/KeyType[SO] val secret = "secret".asInstanceOf[KeyType] +crypto/KeyType[SO] val `private`: KeyType +crypto/KeyType[SO] val public: KeyType +crypto/KeyType[SO] val secret: KeyType crypto/KeyUsage[JT] -crypto/KeyUsage[SO] val decrypt = "decrypt".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val deriveBits = "deriveBits".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val deriveKey = "deriveKey".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val encrypt = "encrypt".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val sign = "sign".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val unwrapKey = "unwrapKey".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val verify = "verify".asInstanceOf[KeyUsage] -crypto/KeyUsage[SO] val wrapKey = "wrapKey".asInstanceOf[KeyUsage] +crypto/KeyUsage[SO] val decrypt: KeyUsage +crypto/KeyUsage[SO] val deriveBits: KeyUsage +crypto/KeyUsage[SO] val deriveKey: KeyUsage +crypto/KeyUsage[SO] val encrypt: KeyUsage +crypto/KeyUsage[SO] val sign: KeyUsage +crypto/KeyUsage[SO] val unwrapKey: KeyUsage +crypto/KeyUsage[SO] val verify: KeyUsage +crypto/KeyUsage[SO] val wrapKey: KeyUsage crypto/Pbkdf2Params[JT] var hash: HashAlgorithmIdentifier crypto/Pbkdf2Params[JT] var iterations: Double crypto/Pbkdf2Params[JT] var name: String @@ -23561,9 +23561,9 @@ experimental/gamepad/GamepadEventInit[JT] var gamepad: js.UndefOr[Gamepad] experimental/gamepad/GamepadEventInit[JT] var scoped: js.UndefOr[Boolean] experimental/gamepad/GamepadMappingType[JT] experimental/gamepad/GamepadNavigator[JT] def getGamepads(): js.Array[Gamepad] -experimental/gamepad/package[SO] final val `standard` = "standard".asInstanceOf[GamepadMappingType] +experimental/gamepad/package[SO] final val standard: GamepadMappingType experimental/gamepad/package[SO] implicit def toGamepad(navigator: dom.Navigator): GamepadNavigator -experimental/gamepad/package[SO] final val `unknown` = "".asInstanceOf[GamepadMappingType] +experimental/gamepad/package[SO] final val unknown: GamepadMappingType experimental/intl/Collator[JC] def compare(string1: String, string2: String): Double experimental/intl/Collator[JC] def resolvedOptions(): CollatorOptions experimental/intl/Collator[JC] def supportedLocalesOf(locales: String | js.Array[String], options: js.Any): js.Array[String] @@ -23627,9 +23627,9 @@ experimental/mediastream/MediaDeviceInfo[JT] val kind: MediaDeviceKind experimental/mediastream/MediaDeviceInfo[JT] val label: String experimental/mediastream/MediaDeviceInfo[SO] def apply(deviceId: js.UndefOr[String] = js.undefined, groupId: js.UndefOr[String] = js.undefined, kind: js.UndefOr[String] = js.undefined, label: js.UndefOr[String] = js.undefined): MediaDeviceInfo experimental/mediastream/MediaDeviceKind[JT] -experimental/mediastream/MediaDeviceKind[SO] val audioinput = "audioinput".asInstanceOf[MediaDeviceKind] -experimental/mediastream/MediaDeviceKind[SO] val audiooutput = "audiooutput".asInstanceOf[MediaDeviceKind] -experimental/mediastream/MediaDeviceKind[SO] val videoinput = "videoinput".asInstanceOf[MediaDeviceKind] +experimental/mediastream/MediaDeviceKind[SO] val audioinput: MediaDeviceKind +experimental/mediastream/MediaDeviceKind[SO] val audiooutput: MediaDeviceKind +experimental/mediastream/MediaDeviceKind[SO] val videoinput: MediaDeviceKind experimental/mediastream/MediaDevices[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit experimental/mediastream/MediaDevices[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit experimental/mediastream/MediaDevices[JT] def dispatchEvent(evt: Event): Boolean @@ -23722,8 +23722,8 @@ experimental/mediastream/MediaStreamTrackEventInit[JT] var composed: js.UndefOr[ experimental/mediastream/MediaStreamTrackEventInit[JT] var scoped: js.UndefOr[Boolean] experimental/mediastream/MediaStreamTrackEventInit[JT] var track: js.UndefOr[MediaStreamTrack] experimental/mediastream/MediaStreamTrackState[JT] -experimental/mediastream/MediaStreamTrackState[SO] val ended = "ended".asInstanceOf[MediaStreamTrackState] -experimental/mediastream/MediaStreamTrackState[SO] val live = "live".asInstanceOf[MediaStreamTrackState] +experimental/mediastream/MediaStreamTrackState[SO] val ended: MediaStreamTrackState +experimental/mediastream/MediaStreamTrackState[SO] val live: MediaStreamTrackState experimental/mediastream/MediaTrackConstraintSet[JT] var aspectRatio: Double experimental/mediastream/MediaTrackConstraintSet[JT] var deviceId: String experimental/mediastream/MediaTrackConstraintSet[JT] var echoCancellation: Boolean @@ -23927,19 +23927,19 @@ experimental/package.ResponseInit[SO] var status = _status (@deprecated in 2.0. experimental/package.ResponseInit[SO] var statusText = _statusText (@deprecated in 2.0.0) experimental/permissions/package[SO] def apply(permissionName: PermissionName): PermissionDescriptor experimental/permissions/package[SO] def apply(permissionUserVisibleOnly: Boolean): PushPermissionDescriptor -experimental/permissions/package[SO] val denied = "denied".asInstanceOf[PermissionState] -experimental/permissions/package[SO] val geolocation = "geolocation".asInstanceOf[PermissionName] -experimental/permissions/package[SO] val granted = "granted".asInstanceOf[PermissionState] -experimental/permissions/package[SO] val midi = "midi".asInstanceOf[PermissionName] +experimental/permissions/package[SO] val denied: PermissionState +experimental/permissions/package[SO] val geolocation: PermissionName +experimental/permissions/package[SO] val granted: PermissionState +experimental/permissions/package[SO] val midi: PermissionName experimental/permissions/package[SO] val name = PermissionName.push experimental/permissions/package[SO] val name = permissionName experimental/permissions/package[SO] val name: PermissionName -experimental/permissions/package[SO] val notifications = "notifications".asInstanceOf[PermissionName] +experimental/permissions/package[SO] val notifications: PermissionName experimental/permissions/package[SO] var onchange: js.Function1[dom.Event, _] experimental/permissions/package[SO] val permissions: Permissions experimental/permissions/package[SO] val `persistent-storage` = "persistent-storage".asInstanceOf[PermissionName] -experimental/permissions/package[SO] val prompt = "prompt".asInstanceOf[PermissionState] -experimental/permissions/package[SO] val push = "push".asInstanceOf[PermissionName] +experimental/permissions/package[SO] val prompt: PermissionState +experimental/permissions/package[SO] val push: PermissionName experimental/permissions/package[SO] def query(permissionDescriptor: PermissionDescriptor): js.Promise[PermissionStatus] experimental/permissions/package[SO] val state: PermissionState experimental/permissions/package[SO] implicit def toPermissions(navigator: dom.Navigator): PermissionsNavigator @@ -23949,15 +23949,15 @@ experimental/permissions/package.PermissionDescriptor[JT] val name: PermissionNa experimental/permissions/package.PermissionDescriptor[SO] def apply(permissionName: PermissionName): PermissionDescriptor experimental/permissions/package.PermissionDescriptor[SO] val name = permissionName experimental/permissions/package.PermissionName[JT] -experimental/permissions/package.PermissionName[SO] val geolocation = "geolocation".asInstanceOf[PermissionName] -experimental/permissions/package.PermissionName[SO] val midi = "midi".asInstanceOf[PermissionName] -experimental/permissions/package.PermissionName[SO] val notifications = "notifications".asInstanceOf[PermissionName] +experimental/permissions/package.PermissionName[SO] val geolocation: PermissionName +experimental/permissions/package.PermissionName[SO] val midi: PermissionName +experimental/permissions/package.PermissionName[SO] val notifications: PermissionName experimental/permissions/package.PermissionName[SO] val `persistent-storage` = "persistent-storage".asInstanceOf[PermissionName] -experimental/permissions/package.PermissionName[SO] val push = "push".asInstanceOf[PermissionName] +experimental/permissions/package.PermissionName[SO] val push: PermissionName experimental/permissions/package.PermissionState[JT] -experimental/permissions/package.PermissionState[SO] val denied = "denied".asInstanceOf[PermissionState] -experimental/permissions/package.PermissionState[SO] val granted = "granted".asInstanceOf[PermissionState] -experimental/permissions/package.PermissionState[SO] val prompt = "prompt".asInstanceOf[PermissionState] +experimental/permissions/package.PermissionState[SO] val denied: PermissionState +experimental/permissions/package.PermissionState[SO] val granted: PermissionState +experimental/permissions/package.PermissionState[SO] val prompt: PermissionState experimental/permissions/package.PermissionStatus[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit experimental/permissions/package.PermissionStatus[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit experimental/permissions/package.PermissionStatus[JT] def dispatchEvent(evt: Event): Boolean @@ -23973,8 +23973,8 @@ experimental/permissions/package.PushPermissionDescriptor[SO] def apply(permissi experimental/permissions/package.PushPermissionDescriptor[SO] val name = PermissionName.push experimental/permissions/package.PushPermissionDescriptor[SO] val userVisibleOnly = permissionUserVisibleOnly experimental/push/PushEncryptionKeyName[JT] -experimental/push/PushEncryptionKeyName[SO] val auth = "auth".asInstanceOf[PushEncryptionKeyName] -experimental/push/PushEncryptionKeyName[SO] val p256dh = "p256dh".asInstanceOf[PushEncryptionKeyName] +experimental/push/PushEncryptionKeyName[SO] val auth: PushEncryptionKeyName +experimental/push/PushEncryptionKeyName[SO] val p256dh: PushEncryptionKeyName experimental/push/PushEvent[JT] def bubbles: Boolean experimental/push/PushEvent[JT] def cancelBubble: Boolean experimental/push/PushEvent[JT] def cancelable: Boolean @@ -23998,9 +23998,9 @@ experimental/push/PushMessageData[JT] def blob(): Blob experimental/push/PushMessageData[JT] def json(): js.Any experimental/push/PushMessageData[JT] def text(): String experimental/push/PushPermissionState[JT] -experimental/push/PushPermissionState[SO] val denied = "denied".asInstanceOf[PushPermissionState] -experimental/push/PushPermissionState[SO] val granted = "granted".asInstanceOf[PushPermissionState] -experimental/push/PushPermissionState[SO] val prompt = "prompt".asInstanceOf[PushPermissionState] +experimental/push/PushPermissionState[SO] val denied: PushPermissionState +experimental/push/PushPermissionState[SO] val granted: PushPermissionState +experimental/push/PushPermissionState[SO] val prompt: PushPermissionState experimental/push/PushSubscription[JT] val endpoint: String experimental/push/PushSubscription[JT] val expirationTime: java.lang.Double experimental/push/PushSubscription[JT] def getKey(name: PushEncryptionKeyName): ArrayBuffer @@ -24044,10 +24044,10 @@ experimental/serviceworkers/Client[JT] def url: String experimental/serviceworkers/ClientQueryOptions[JT] var includeUncontrolled: Boolean experimental/serviceworkers/ClientQueryOptions[JT] var `type`: ClientType experimental/serviceworkers/ClientType[JT] -experimental/serviceworkers/ClientType[SO] val all = "all".asInstanceOf[ClientType] -experimental/serviceworkers/ClientType[SO] val sharedworker = "sharedworker".asInstanceOf[ClientType] -experimental/serviceworkers/ClientType[SO] val window = "window".asInstanceOf[ClientType] -experimental/serviceworkers/ClientType[SO] val worker = "worker".asInstanceOf[ClientType] +experimental/serviceworkers/ClientType[SO] val all: ClientType +experimental/serviceworkers/ClientType[SO] val sharedworker: ClientType +experimental/serviceworkers/ClientType[SO] val window: ClientType +experimental/serviceworkers/ClientType[SO] val worker: ClientType experimental/serviceworkers/Clients[JT] def claim(): js.Promise[Unit] experimental/serviceworkers/Clients[JT] def get(id: String): js.Promise[js.UndefOr[Client]] experimental/serviceworkers/Clients[JT] def matchAll(options: js.UndefOr[ClientQueryOptions]?): js.Promise[js.Array[Client]] @@ -24127,9 +24127,9 @@ experimental/serviceworkers/FetchEventInit[JT] var isReload: js.UndefOr[Boolean] experimental/serviceworkers/FetchEventInit[JT] var request: js.UndefOr[Request] experimental/serviceworkers/FetchEventInit[JT] var scoped: js.UndefOr[Boolean] experimental/serviceworkers/FrameType[JT] -experimental/serviceworkers/FrameType[SO] val auxiliary = "auxiliary".asInstanceOf[FrameType] -experimental/serviceworkers/FrameType[SO] val nested = "nested".asInstanceOf[FrameType] -experimental/serviceworkers/FrameType[SO] val none = "none".asInstanceOf[FrameType] +experimental/serviceworkers/FrameType[SO] val auxiliary: FrameType +experimental/serviceworkers/FrameType[SO] val nested: FrameType +experimental/serviceworkers/FrameType[SO] val none: FrameType experimental/serviceworkers/FrameType[SO] val `top-level` = "top-level".asInstanceOf[FrameType] experimental/serviceworkers/GetNotificationOptions[JT] var tag: js.UndefOr[String] experimental/serviceworkers/ServiceWorker[JT] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit @@ -24216,11 +24216,11 @@ experimental/serviceworkers/ServiceWorkerRegistration[JT] def unregister(): js.P experimental/serviceworkers/ServiceWorkerRegistration[JT] def update(): js.Promise[Unit] experimental/serviceworkers/ServiceWorkerRegistration[JT] var waiting: ServiceWorker experimental/serviceworkers/ServiceWorkerState[JT] -experimental/serviceworkers/ServiceWorkerState[SO] val activated = "activated".asInstanceOf[ServiceWorkerState] -experimental/serviceworkers/ServiceWorkerState[SO] val activating = "activating".asInstanceOf[ServiceWorkerState] -experimental/serviceworkers/ServiceWorkerState[SO] val installed = "installed".asInstanceOf[ServiceWorkerState] -experimental/serviceworkers/ServiceWorkerState[SO] val installing = "installing".asInstanceOf[ServiceWorkerState] -experimental/serviceworkers/ServiceWorkerState[SO] val redundant = "redundant".asInstanceOf[ServiceWorkerState] +experimental/serviceworkers/ServiceWorkerState[SO] val activated: ServiceWorkerState +experimental/serviceworkers/ServiceWorkerState[SO] val activating: ServiceWorkerState +experimental/serviceworkers/ServiceWorkerState[SO] val installed: ServiceWorkerState +experimental/serviceworkers/ServiceWorkerState[SO] val installing: ServiceWorkerState +experimental/serviceworkers/ServiceWorkerState[SO] val redundant: ServiceWorkerState experimental/serviceworkers/WindowClient[JT] def focus(): js.Promise[WindowClient] experimental/serviceworkers/WindowClient[JT] def focused: Boolean experimental/serviceworkers/WindowClient[JT] def frameType: FrameType @@ -24424,7 +24424,7 @@ experimental/webrtc/MediaStreamEventInit[JT] var composed: js.UndefOr[Boolean] experimental/webrtc/MediaStreamEventInit[JT] var scoped: js.UndefOr[Boolean] experimental/webrtc/MediaStreamEventInit[JT] var stream: js.UndefOr[MediaStream] experimental/webrtc/RTCBundlePolicy[JT] -experimental/webrtc/RTCBundlePolicy[SO] val balanced = "balanced".asInstanceOf[RTCBundlePolicy] +experimental/webrtc/RTCBundlePolicy[SO] val balanced: RTCBundlePolicy experimental/webrtc/RTCBundlePolicy[SO] val `max-bundle` = "max-bundle".asInstanceOf[RTCBundlePolicy] experimental/webrtc/RTCBundlePolicy[SO] val `max-compat` = "max-compat".asInstanceOf[RTCBundlePolicy] experimental/webrtc/RTCConfiguration[JT] var bundlePolicy: RTCBundlePolicy @@ -24487,10 +24487,10 @@ experimental/webrtc/RTCDataChannelInit[JT] var ordered: Boolean experimental/webrtc/RTCDataChannelInit[JT] var protocol: String experimental/webrtc/RTCDataChannelInit[SO] def apply(ordered: js.UndefOr[Boolean] = js.undefined, maxPacketLifeTime: js.UndefOr[Double] = js.undefined, maxRetransmits: js.UndefOr[Double] = js.undefined, protocol: js.UndefOr[String] = js.undefined, negotiated: js.UndefOr[Boolean] = js.undefined, id: js.UndefOr[Double] = js.undefined): RTCDataChannelInit experimental/webrtc/RTCDataChannelState[JT] -experimental/webrtc/RTCDataChannelState[SO] val closed = "closed".asInstanceOf[RTCDataChannelState] -experimental/webrtc/RTCDataChannelState[SO] val closing = "closing".asInstanceOf[RTCDataChannelState] -experimental/webrtc/RTCDataChannelState[SO] val connecting = "connecting".asInstanceOf[RTCDataChannelState] -experimental/webrtc/RTCDataChannelState[SO] val open = "open".asInstanceOf[RTCDataChannelState] +experimental/webrtc/RTCDataChannelState[SO] val closed: RTCDataChannelState +experimental/webrtc/RTCDataChannelState[SO] val closing: RTCDataChannelState +experimental/webrtc/RTCDataChannelState[SO] val connecting: RTCDataChannelState +experimental/webrtc/RTCDataChannelState[SO] val open: RTCDataChannelState experimental/webrtc/RTCIceCandidate[JC] var candidate: String experimental/webrtc/RTCIceCandidate[JC] var sdpMLineIndex: Double experimental/webrtc/RTCIceCandidate[JC] var sdpMid: String @@ -24499,25 +24499,25 @@ experimental/webrtc/RTCIceCandidateInit[JT] var sdpMLineIndex: Double experimental/webrtc/RTCIceCandidateInit[JT] var sdpMid: String experimental/webrtc/RTCIceCandidateInit[SO] def apply(candidate: js.UndefOr[String] = js.undefined, sdpMid: js.UndefOr[String] = js.undefined, sdpMLineIndex: js.UndefOr[Double] = js.undefined): RTCIceCandidateInit experimental/webrtc/RTCIceConnectionState[JT] -experimental/webrtc/RTCIceConnectionState[SO] val checking = "checking".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val closed = "closed".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val completed = "completed".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val connected = "connected".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val disconnected = "disconnected".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val failed = "failed".asInstanceOf[RTCIceConnectionState] -experimental/webrtc/RTCIceConnectionState[SO] val `new` = "new".asInstanceOf[RTCIceConnectionState] +experimental/webrtc/RTCIceConnectionState[SO] val checking: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val closed: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val completed: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val connected: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val disconnected: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val failed: RTCIceConnectionState +experimental/webrtc/RTCIceConnectionState[SO] val `new`: RTCIceConnectionState experimental/webrtc/RTCIceGatheringState[JT] -experimental/webrtc/RTCIceGatheringState[SO] val complete = "complete".asInstanceOf[RTCIceGatheringState] -experimental/webrtc/RTCIceGatheringState[SO] val gathering = "gathering".asInstanceOf[RTCIceGatheringState] -experimental/webrtc/RTCIceGatheringState[SO] val `new` = "new".asInstanceOf[RTCIceGatheringState] +experimental/webrtc/RTCIceGatheringState[SO] val complete: RTCIceGatheringState +experimental/webrtc/RTCIceGatheringState[SO] val gathering: RTCIceGatheringState +experimental/webrtc/RTCIceGatheringState[SO] val `new`: RTCIceGatheringState experimental/webrtc/RTCIceServer[JT] var credential: String experimental/webrtc/RTCIceServer[JT] var urls: String | js.Array[String] experimental/webrtc/RTCIceServer[JT] var username: String experimental/webrtc/RTCIceServer[SO] def apply(urls: js.UndefOr[String | js.Array[String]] = js.undefined, username: js.UndefOr[String] = js.undefined, credential: js.UndefOr[String] = js.undefined): RTCIceServer experimental/webrtc/RTCIceTransportPolicy[JT] -experimental/webrtc/RTCIceTransportPolicy[SO] val all = "all".asInstanceOf[RTCIceTransportPolicy] -experimental/webrtc/RTCIceTransportPolicy[SO] val none = "none".asInstanceOf[RTCIceTransportPolicy] -experimental/webrtc/RTCIceTransportPolicy[SO] val relay = "relay".asInstanceOf[RTCIceTransportPolicy] +experimental/webrtc/RTCIceTransportPolicy[SO] val all: RTCIceTransportPolicy +experimental/webrtc/RTCIceTransportPolicy[SO] val none: RTCIceTransportPolicy +experimental/webrtc/RTCIceTransportPolicy[SO] val relay: RTCIceTransportPolicy experimental/webrtc/RTCIdentityAssertion[JT] val idp: String experimental/webrtc/RTCIdentityAssertion[JT] val name: String experimental/webrtc/RTCIdentityAssertion[SO] def apply(idp: js.UndefOr[String] = js.undefined, name: js.UndefOr[String] = js.undefined): RTCIdentityAssertion @@ -24587,21 +24587,21 @@ experimental/webrtc/RTCPeerConnectionIceEventInit[JT] var candidate: js.UndefOr[ experimental/webrtc/RTCPeerConnectionIceEventInit[JT] var composed: js.UndefOr[Boolean] experimental/webrtc/RTCPeerConnectionIceEventInit[JT] var scoped: js.UndefOr[Boolean] experimental/webrtc/RTCSdpType[JT] -experimental/webrtc/RTCSdpType[SO] val answer = "answer".asInstanceOf[RTCSdpType] -experimental/webrtc/RTCSdpType[SO] val offer = "offer".asInstanceOf[RTCSdpType] -experimental/webrtc/RTCSdpType[SO] val pranswer = "pranswer".asInstanceOf[RTCSdpType] +experimental/webrtc/RTCSdpType[SO] val answer: RTCSdpType +experimental/webrtc/RTCSdpType[SO] val offer: RTCSdpType +experimental/webrtc/RTCSdpType[SO] val pranswer: RTCSdpType experimental/webrtc/RTCSessionDescription[JC] var sdp: String experimental/webrtc/RTCSessionDescription[JC] var `type`: RTCSdpType experimental/webrtc/RTCSessionDescriptionInit[JT] var sdp: String experimental/webrtc/RTCSessionDescriptionInit[JT] var `type`: RTCSdpType experimental/webrtc/RTCSessionDescriptionInit[SO] def apply(`type`: js.UndefOr[RTCSdpType] = js.undefined, sdp: js.UndefOr[String] = js.undefined): RTCSessionDescriptionInit experimental/webrtc/RTCSignalingState[JT] -experimental/webrtc/RTCSignalingState[SO] val closed = "closed".asInstanceOf[RTCSignalingState] +experimental/webrtc/RTCSignalingState[SO] val closed: RTCSignalingState experimental/webrtc/RTCSignalingState[SO] val `have-local-offer` = "have-local-offer".asInstanceOf[RTCSignalingState] experimental/webrtc/RTCSignalingState[SO] val `have-local-pranswer` = "have-local-pranswer".asInstanceOf[RTCSignalingState] experimental/webrtc/RTCSignalingState[SO] val `have-remote-offer` = "have-remote-offer".asInstanceOf[RTCSignalingState] experimental/webrtc/RTCSignalingState[SO] val `have-remote-pranswer` = "have-remote-pranswer".asInstanceOf[RTCSignalingState] -experimental/webrtc/RTCSignalingState[SO] val stable = "stable".asInstanceOf[RTCSignalingState] +experimental/webrtc/RTCSignalingState[SO] val stable: RTCSignalingState experimental/webrtc/RTCStats[JT] var id: String experimental/webrtc/RTCStats[JT] var timestamp: Double experimental/webrtc/RTCStats[JT] var `type`: RTCStatsType @@ -24616,12 +24616,12 @@ ext/Ajax[SO] def apply(method: String, url: String, data: InputData, timeout: In ext/Ajax[SO] implicit def arrayBufferView2ajax(b: ArrayBufferView): InputData (@deprecated in 2.0.0) ext/Ajax[SO] implicit def blob2ajax(b: Blob): InputData (@deprecated in 2.0.0) ext/Ajax[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData (@deprecated in 2.0.0) -ext/Ajax[SO] def delete(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = "") = { apply("DELETE", url, data, timeout, headers, withCredentials, responseType) } (@deprecated in 2.0.0) +ext/Ajax[SO] def delete(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0) ext/Ajax[SO] implicit def formdata2ajax(b: FormData): InputData (@deprecated in 2.0.0) -ext/Ajax[SO] def get(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = "") = { apply("GET", url, data, timeout, headers, withCredentials, responseType) } (@deprecated in 2.0.0) -ext/Ajax[SO] def patch(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = "") = { apply("PATCH", url, data, timeout, headers, withCredentials, responseType) } (@deprecated in 2.0.0) -ext/Ajax[SO] def post(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = "") = { apply("POST", url, data, timeout, headers, withCredentials, responseType) } (@deprecated in 2.0.0) -ext/Ajax[SO] def put(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = "") = { apply("PUT", url, data, timeout, headers, withCredentials, responseType) } (@deprecated in 2.0.0) +ext/Ajax[SO] def get(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0) +ext/Ajax[SO] def patch(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0) +ext/Ajax[SO] def post(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0) +ext/Ajax[SO] def put(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0) ext/Ajax[SO] implicit def str2ajax(s: String): InputData (@deprecated in 2.0.0) ext/Ajax.InputData[JT] ext/Ajax.InputData[SO] implicit def arrayBufferView2ajax(b: ArrayBufferView): InputData @@ -24629,7 +24629,7 @@ ext/Ajax.InputData[SO] implicit def blob2ajax(b: Blob): InputData ext/Ajax.InputData[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData ext/Ajax.InputData[SO] implicit def formdata2ajax(b: FormData): InputData ext/Ajax.InputData[SO] implicit def str2ajax(s: String): InputData -ext/AjaxException[SC] def isTimeout = xhr.status = = 0 && xhr.readyState = = 4 (@deprecated in 2.0.0) +ext/AjaxException[SC] def isTimeout: Boolean (@deprecated in 2.0.0) ext/AjaxException[SO] (@deprecated in 2.0.0) ext/package[SO] val KeyCode: dom.KeyCode.type (@deprecated in 2.0.0) ext/package[SO] val KeyLocation: dom.KeyLocation.type (@deprecated in 2.0.0) diff --git a/prePR.sbt b/prePR.sbt index d5ecb479a..efe23df09 100644 --- a/prePR.sbt +++ b/prePR.sbt @@ -19,13 +19,13 @@ ThisBuild / prePR_nonCross := Def.sequential( (example / clean).value }, - dom / Compile / scalafmt, Def.taskDyn { - if (scalaVersion.value.startsWith("2.")) + if (scalaVersion.value.matches("2\\.1[23]\\..+")) (dom / Compile / scalafix).toTask("") else - Def.task[Unit]((dom / Compile / compile).value) + Def.task(()) }, + dom / Compile / scalafmt, Def.task { (testsShared / Test / compile).value diff --git a/src/main/scala/org/scalajs/dom/Fetch.scala b/src/main/scala/org/scalajs/dom/Fetch.scala index 3417f7e48..f997a0439 100644 --- a/src/main/scala/org/scalajs/dom/Fetch.scala +++ b/src/main/scala/org/scalajs/dom/Fetch.scala @@ -280,7 +280,7 @@ class Headers(map: HeadersInit = js.Array[js.Array[String]]()) extends js.Iterab sealed trait ReferrerPolicy extends js.Any object ReferrerPolicy { - val empty = "".asInstanceOf[ReferrerPolicy] + val empty: ReferrerPolicy = "".asInstanceOf[ReferrerPolicy] val `no-referrer` = "no-referrer".asInstanceOf[ReferrerPolicy] val `no-referrer-when-downgrade` = @@ -298,14 +298,14 @@ object ReferrerPolicy { trait HttpMethod extends js.Any object HttpMethod { - val GET = "GET".asInstanceOf[HttpMethod] - val POST = "POST".asInstanceOf[HttpMethod] - val PUT = "PUT".asInstanceOf[HttpMethod] - val PATCH = "PATCH".asInstanceOf[HttpMethod] - val DELETE = "DELETE".asInstanceOf[HttpMethod] - val QUERY = "QUERY".asInstanceOf[HttpMethod] - val HEAD = "HEAD".asInstanceOf[HttpMethod] - val OPTIONS = "OPTIONS".asInstanceOf[HttpMethod] + val GET: HttpMethod = "GET".asInstanceOf[HttpMethod] + val POST: HttpMethod = "POST".asInstanceOf[HttpMethod] + val PUT: HttpMethod = "PUT".asInstanceOf[HttpMethod] + val PATCH: HttpMethod = "PATCH".asInstanceOf[HttpMethod] + val DELETE: HttpMethod = "DELETE".asInstanceOf[HttpMethod] + val QUERY: HttpMethod = "QUERY".asInstanceOf[HttpMethod] + val HEAD: HttpMethod = "HEAD".asInstanceOf[HttpMethod] + val OPTIONS: HttpMethod = "OPTIONS".asInstanceOf[HttpMethod] } /** Fetch APIs [[https://fetch.spec.whatwg.org/#requesttype RequestType enum]] @@ -314,14 +314,14 @@ object HttpMethod { sealed trait RequestType extends js.Any object RequestType { - val empty = "".asInstanceOf[RequestType] - val audio = "audio".asInstanceOf[RequestType] - val font = "font".asInstanceOf[RequestType] - val image = "image".asInstanceOf[RequestType] - val script = "script".asInstanceOf[RequestType] - val style = "style".asInstanceOf[RequestType] - val track = "track".asInstanceOf[RequestType] - val video = "video".asInstanceOf[RequestType] + val empty: RequestType = "".asInstanceOf[RequestType] + val audio: RequestType = "audio".asInstanceOf[RequestType] + val font: RequestType = "font".asInstanceOf[RequestType] + val image: RequestType = "image".asInstanceOf[RequestType] + val script: RequestType = "script".asInstanceOf[RequestType] + val style: RequestType = "style".asInstanceOf[RequestType] + val track: RequestType = "track".asInstanceOf[RequestType] + val video: RequestType = "video".asInstanceOf[RequestType] } /** Fetch APIs [[https://fetch.spec.whatwg.org/#requestdestination RequestDestination enum]] @@ -330,12 +330,12 @@ object RequestType { sealed trait RequestDestination extends js.Any object RequestDestination { - val empty = "".asInstanceOf[RequestDestination] - val document = "document".asInstanceOf[RequestDestination] - val sharedworker = "sharedworker".asInstanceOf[RequestDestination] - val subresource = "subresource".asInstanceOf[RequestDestination] - val unknown = "unknown".asInstanceOf[RequestDestination] - val worker = "worker".asInstanceOf[RequestDestination] + val empty: RequestDestination = "".asInstanceOf[RequestDestination] + val document: RequestDestination = "document".asInstanceOf[RequestDestination] + val sharedworker: RequestDestination = "sharedworker".asInstanceOf[RequestDestination] + val subresource: RequestDestination = "subresource".asInstanceOf[RequestDestination] + val unknown: RequestDestination = "unknown".asInstanceOf[RequestDestination] + val worker: RequestDestination = "worker".asInstanceOf[RequestDestination] } /** Fetch API's [[https://fetch.spec.whatwg.org/#requestmode RequestMode enum]] @@ -344,10 +344,10 @@ object RequestDestination { sealed trait RequestMode extends js.Any object RequestMode { - val navigate = "navigate".asInstanceOf[RequestMode] + val navigate: RequestMode = "navigate".asInstanceOf[RequestMode] val `same-origin` = "same-origin".asInstanceOf[RequestMode] val `no-cors` = "no-cors".asInstanceOf[RequestMode] - val cors = "cors".asInstanceOf[RequestMode] + val cors: RequestMode = "cors".asInstanceOf[RequestMode] } /** Fetch APIs [[https://fetch.spec.whatwg.org/#requestcredentials RequestCredentials enum]] @@ -356,9 +356,9 @@ object RequestMode { sealed trait RequestCredentials extends js.Any object RequestCredentials { - val omit = "omit".asInstanceOf[RequestCredentials] + val omit: RequestCredentials = "omit".asInstanceOf[RequestCredentials] val `same-origin` = "same-origin".asInstanceOf[RequestCredentials] - val include = "include".asInstanceOf[RequestCredentials] + val include: RequestCredentials = "include".asInstanceOf[RequestCredentials] } /** Fetch APIs [[https://fetch.spec.whatwg.org/#requestcache RequestCache enum]] @@ -367,9 +367,9 @@ object RequestCredentials { sealed trait RequestCache extends js.Any object RequestCache { - val default = "default".asInstanceOf[RequestCache] + val default: RequestCache = "default".asInstanceOf[RequestCache] val `no-store` = "no-store".asInstanceOf[RequestCache] - val reload = "reload".asInstanceOf[RequestCache] + val reload: RequestCache = "reload".asInstanceOf[RequestCache] val `no-cache` = "no-cache".asInstanceOf[RequestCache] val `force-cache` = "force-cache".asInstanceOf[RequestCache] val `only-if-cached` = "only-if-cached".asInstanceOf[RequestCache] @@ -381,9 +381,9 @@ object RequestCache { sealed trait RequestRedirect extends js.Any object RequestRedirect { - val follow = "follow".asInstanceOf[RequestRedirect] - val error = "error".asInstanceOf[RequestRedirect] - val manual = "manual".asInstanceOf[RequestRedirect] + val follow: RequestRedirect = "follow".asInstanceOf[RequestRedirect] + val error: RequestRedirect = "error".asInstanceOf[RequestRedirect] + val manual: RequestRedirect = "manual".asInstanceOf[RequestRedirect] } @js.native @@ -392,10 +392,10 @@ sealed trait ResponseType extends js.Any /** see [[https://fetch.spec.whatwg.org/#responsetype]] of whatwg Fetch spec */ object ResponseType { - val basic = "basic".asInstanceOf[ResponseType] - val cors = "cors".asInstanceOf[ResponseType] - val default = "default".asInstanceOf[ResponseType] - val error = "error".asInstanceOf[ResponseType] - val opaque = "opaque".asInstanceOf[ResponseType] - val opaqueredirect = "opaqueredirect".asInstanceOf[ResponseType] + val basic: ResponseType = "basic".asInstanceOf[ResponseType] + val cors: ResponseType = "cors".asInstanceOf[ResponseType] + val default: ResponseType = "default".asInstanceOf[ResponseType] + val error: ResponseType = "error".asInstanceOf[ResponseType] + val opaque: ResponseType = "opaque".asInstanceOf[ResponseType] + val opaqueredirect: ResponseType = "opaqueredirect".asInstanceOf[ResponseType] } diff --git a/src/main/scala/org/scalajs/dom/IDBTypes.scala b/src/main/scala/org/scalajs/dom/IDBTypes.scala index e57b426f1..404c9a4ec 100644 --- a/src/main/scala/org/scalajs/dom/IDBTypes.scala +++ b/src/main/scala/org/scalajs/dom/IDBTypes.scala @@ -22,7 +22,7 @@ object IDBTransactionMode { * * MDN */ - val READ_ONLY = "readonly".asInstanceOf[IDBTransactionMode] + val READ_ONLY: IDBTransactionMode = "readonly".asInstanceOf[IDBTransactionMode] /** Allows any operation to be performed, including ones that delete and create object stores and indexes. This mode * is for updating the version number of transactions that were started using the setVersion() method of IDBDatabase @@ -30,13 +30,13 @@ object IDBTransactionMode { * * MDN */ - val VERSION_CHANGE = "versionchange".asInstanceOf[IDBTransactionMode] + val VERSION_CHANGE: IDBTransactionMode = "versionchange".asInstanceOf[IDBTransactionMode] /** Allows reading and writing of data in existing data stores to be changed. * * MDN */ - val READ_WRITE = "readwrite".asInstanceOf[IDBTransactionMode] + val READ_WRITE: IDBTransactionMode = "readwrite".asInstanceOf[IDBTransactionMode] } @@ -355,28 +355,28 @@ object IDBCursorDirection { * * MDN */ - val PREV = "prev".asInstanceOf[IDBCursorDirection] + val PREV: IDBCursorDirection = "prev".asInstanceOf[IDBCursorDirection] /** The cursor shows all records, excluding duplicates. If multiple records exist with the same key, only the first * one iterated is retrieved. It starts at the upper bound of the key range and moves downwards. * * MDN */ - val PREV_UNIQUE = "prevunique".asInstanceOf[IDBCursorDirection] + val PREV_UNIQUE: IDBCursorDirection = "prevunique".asInstanceOf[IDBCursorDirection] /** The cursor shows all records, including duplicates. It starts at the lower bound of the key range and moves * upwards (monotonically increasing in the order of keys). * * MDN */ - val NEXT = "next".asInstanceOf[IDBCursorDirection] + val NEXT: IDBCursorDirection = "next".asInstanceOf[IDBCursorDirection] /** The cursor shows all records, excluding duplicates. If multiple records exist with the same key, only the first * one iterated is retrieved. It starts at the lower bound of the key range and moves upwards. * * MDN */ - val NEXT_UNIQUE = "nextunique".asInstanceOf[IDBCursorDirection] + val NEXT_UNIQUE: IDBCursorDirection = "nextunique".asInstanceOf[IDBCursorDirection] } /** Same as IDBCursor with the value property. diff --git a/src/main/scala/org/scalajs/dom/Stream.scala b/src/main/scala/org/scalajs/dom/Stream.scala index e147ee451..ebc41e819 100644 --- a/src/main/scala/org/scalajs/dom/Stream.scala +++ b/src/main/scala/org/scalajs/dom/Stream.scala @@ -15,23 +15,23 @@ object WriteableState { /** The stream’s internal queue is full; that is, the stream is exerting backpressure. Use .ready to be notified of * when the pressure subsides. */ - val waiting = "waiting".asInstanceOf[WriteableState] + val waiting: WriteableState = "waiting".asInstanceOf[WriteableState] /** The stream’s internal queue is not full; call .write() until backpressure is exerted. */ - val writable = "writable".asInstanceOf[WriteableState] + val writable: WriteableState = "writable".asInstanceOf[WriteableState] /** The stream’s .close() method has been called, and a command to close is in the queue or being processed by the * underlying sink; attempts to write will now fail. */ - val closing = "closing".asInstanceOf[WriteableState] + val closing: WriteableState = "closing".asInstanceOf[WriteableState] /** The underlying sink has been closed; writing is no longer possible. */ - val closed = "closed".asInstanceOf[WriteableState] + val closed: WriteableState = "closed".asInstanceOf[WriteableState] /** An error occurred interacting with the underlying sink or the stream has been aborted, so the stream is now dead. */ - val errored = "errored".asInstanceOf[WriteableState] + val errored: WriteableState = "errored".asInstanceOf[WriteableState] } /** [[https://streams.spec.whatwg.org/#ws-class ¶4.2. Class WritableStream]] of whatwg Stream spec diff --git a/src/main/scala/org/scalajs/dom/crypto/Crypto.scala b/src/main/scala/org/scalajs/dom/crypto/Crypto.scala index 16d9a5175..6cac56cd6 100644 --- a/src/main/scala/org/scalajs/dom/crypto/Crypto.scala +++ b/src/main/scala/org/scalajs/dom/crypto/Crypto.scala @@ -827,14 +827,14 @@ object Pbkdf2Params { trait KeyUsage extends js.Any object KeyUsage { - val encrypt = "encrypt".asInstanceOf[KeyUsage] - val decrypt = "decrypt".asInstanceOf[KeyUsage] - val sign = "sign".asInstanceOf[KeyUsage] - val verify = "verify".asInstanceOf[KeyUsage] - val deriveKey = "deriveKey".asInstanceOf[KeyUsage] - val deriveBits = "deriveBits".asInstanceOf[KeyUsage] - val wrapKey = "wrapKey".asInstanceOf[KeyUsage] - val unwrapKey = "unwrapKey".asInstanceOf[KeyUsage] + val encrypt: KeyUsage = "encrypt".asInstanceOf[KeyUsage] + val decrypt: KeyUsage = "decrypt".asInstanceOf[KeyUsage] + val sign: KeyUsage = "sign".asInstanceOf[KeyUsage] + val verify: KeyUsage = "verify".asInstanceOf[KeyUsage] + val deriveKey: KeyUsage = "deriveKey".asInstanceOf[KeyUsage] + val deriveBits: KeyUsage = "deriveBits".asInstanceOf[KeyUsage] + val wrapKey: KeyUsage = "wrapKey".asInstanceOf[KeyUsage] + val unwrapKey: KeyUsage = "unwrapKey".asInstanceOf[KeyUsage] } /** see [[http://www.w3.org/TR/WebCryptoAPI/#cryptokey-interface ¶13 CryptoKey interface]] in W3C doc @@ -843,9 +843,9 @@ object KeyUsage { trait KeyType extends js.Any object KeyType { - val public = "public".asInstanceOf[KeyType] - val `private` = "private".asInstanceOf[KeyType] - val secret = "secret".asInstanceOf[KeyType] + val public: KeyType = "public".asInstanceOf[KeyType] + val `private`: KeyType = "private".asInstanceOf[KeyType] + val secret: KeyType = "secret".asInstanceOf[KeyType] } /** see [[http://www.w3.org/TR/WebCryptoAPI/#dfn-KeyFormat ¶14.2 Data Types]] in W3C spec @@ -856,16 +856,16 @@ trait KeyFormat extends js.Any object KeyFormat { /** An unformatted sequence of bytes. Intended for secret keys. */ - val raw = "raw".asInstanceOf[KeyFormat] + val raw: KeyFormat = "raw".asInstanceOf[KeyFormat] /** The DER encoding of the PrivateKeyInfo structure from RFC 5208. */ - val pkcs8 = "pkcs8".asInstanceOf[KeyFormat] + val pkcs8: KeyFormat = "pkcs8".asInstanceOf[KeyFormat] /** The DER encoding of the SubjectPublicKeyInfo structure from RFC 5280. */ - val spki = "spki".asInstanceOf[KeyFormat] + val spki: KeyFormat = "spki".asInstanceOf[KeyFormat] /** The key is a JsonWebKey dictionary encoded as a JavaScript object */ - val jwk = "jwk".asInstanceOf[KeyFormat] + val jwk: KeyFormat = "jwk".asInstanceOf[KeyFormat] } // diff --git a/src/main/scala/org/scalajs/dom/experimental/gamepad/package.scala b/src/main/scala/org/scalajs/dom/experimental/gamepad/package.scala index 487eaed6a..776c51de6 100644 --- a/src/main/scala/org/scalajs/dom/experimental/gamepad/package.scala +++ b/src/main/scala/org/scalajs/dom/experimental/gamepad/package.scala @@ -12,7 +12,7 @@ package object gamepad { implicit def toGamepad(navigator: dom.Navigator): GamepadNavigator = navigator.asInstanceOf[GamepadNavigator] - final val `unknown` = "".asInstanceOf[GamepadMappingType] + final val `unknown`: GamepadMappingType = "".asInstanceOf[GamepadMappingType] - final val `standard` = "standard".asInstanceOf[GamepadMappingType] + final val `standard`: GamepadMappingType = "standard".asInstanceOf[GamepadMappingType] } diff --git a/src/main/scala/org/scalajs/dom/experimental/mediastream/MediaStream.scala b/src/main/scala/org/scalajs/dom/experimental/mediastream/MediaStream.scala index 69ca4abbc..3c3c03c8d 100644 --- a/src/main/scala/org/scalajs/dom/experimental/mediastream/MediaStream.scala +++ b/src/main/scala/org/scalajs/dom/experimental/mediastream/MediaStream.scala @@ -112,7 +112,7 @@ object MediaStreamTrackState { /** The track is active (the track's underlying media source is making a best-effort attempt to provide data in real * time). The output of a track in the live state can be switched on and off with the enabled attribute. */ - val live = "live".asInstanceOf[MediaStreamTrackState] + val live: MediaStreamTrackState = "live".asInstanceOf[MediaStreamTrackState] /** The track has ended (the track's underlying media source is no longer providing data, and will never provide more * data for this track). Once a track enters this state, it never exits it. @@ -120,7 +120,7 @@ object MediaStreamTrackState { * For example, a video track in a MediaStream ends if the user unplugs the USB web camera that acts as the track's * media source. */ - val ended = "ended".asInstanceOf[MediaStreamTrackState] + val ended: MediaStreamTrackState = "ended".asInstanceOf[MediaStreamTrackState] } @js.native @@ -406,15 +406,15 @@ object MediaDeviceKind { /** Represents an audio input device; for example a microphone. */ - val audioinput = "audioinput".asInstanceOf[MediaDeviceKind] + val audioinput: MediaDeviceKind = "audioinput".asInstanceOf[MediaDeviceKind] /** Represents an audio output device; for example a pair of headphones. */ - val audiooutput = "audiooutput".asInstanceOf[MediaDeviceKind] + val audiooutput: MediaDeviceKind = "audiooutput".asInstanceOf[MediaDeviceKind] /** Represents a video input device; for example a webcam. */ - val videoinput = "videoinput".asInstanceOf[MediaDeviceKind] + val videoinput: MediaDeviceKind = "videoinput".asInstanceOf[MediaDeviceKind] } @js.native diff --git a/src/main/scala/org/scalajs/dom/experimental/permissions/package.scala b/src/main/scala/org/scalajs/dom/experimental/permissions/package.scala index 5ec7869d6..779f44572 100644 --- a/src/main/scala/org/scalajs/dom/experimental/permissions/package.scala +++ b/src/main/scala/org/scalajs/dom/experimental/permissions/package.scala @@ -14,9 +14,9 @@ package object permissions { sealed trait PermissionState extends js.Any object PermissionState { - val granted = "granted".asInstanceOf[PermissionState] - val denied = "denied".asInstanceOf[PermissionState] - val prompt = "prompt".asInstanceOf[PermissionState] + val granted: PermissionState = "granted".asInstanceOf[PermissionState] + val denied: PermissionState = "denied".asInstanceOf[PermissionState] + val prompt: PermissionState = "prompt".asInstanceOf[PermissionState] } trait PermissionStatus extends dom.EventTarget { @@ -28,10 +28,10 @@ package object permissions { sealed trait PermissionName extends js.Any object PermissionName { - val geolocation = "geolocation".asInstanceOf[PermissionName] - val midi = "midi".asInstanceOf[PermissionName] - val notifications = "notifications".asInstanceOf[PermissionName] - val push = "push".asInstanceOf[PermissionName] + val geolocation: PermissionName = "geolocation".asInstanceOf[PermissionName] + val midi: PermissionName = "midi".asInstanceOf[PermissionName] + val notifications: PermissionName = "notifications".asInstanceOf[PermissionName] + val push: PermissionName = "push".asInstanceOf[PermissionName] val `persistent-storage` = "persistent-storage".asInstanceOf[PermissionName] diff --git a/src/main/scala/org/scalajs/dom/experimental/push/PushManager.scala b/src/main/scala/org/scalajs/dom/experimental/push/PushManager.scala index d8b94859e..b63203a5c 100644 --- a/src/main/scala/org/scalajs/dom/experimental/push/PushManager.scala +++ b/src/main/scala/org/scalajs/dom/experimental/push/PushManager.scala @@ -202,15 +202,15 @@ object PushPermissionState { /** The webapp has permission to use the Push API. */ - val granted = "granted".asInstanceOf[PushPermissionState] + val granted: PushPermissionState = "granted".asInstanceOf[PushPermissionState] /** The webapp has been denied permission to use the Push API. */ - val denied = "denied".asInstanceOf[PushPermissionState] + val denied: PushPermissionState = "denied".asInstanceOf[PushPermissionState] /** The webapp needs to ask for permission in order to use the Push API. */ - val prompt = "prompt".asInstanceOf[PushPermissionState] + val prompt: PushPermissionState = "prompt".asInstanceOf[PushPermissionState] } /** This represents a JavaScript enumeration representing the various keys you an request from a [[PushSubscription]] as @@ -225,10 +225,10 @@ object PushEncryptionKeyName { /** used to retrieve the P-256 ECDH Diffie-Hellman public key described here: * [[https://tools.ietf.org/html/draft-ietf-webpush-encryption-01]] */ - val p256dh = "p256dh".asInstanceOf[PushEncryptionKeyName] + val p256dh: PushEncryptionKeyName = "p256dh".asInstanceOf[PushEncryptionKeyName] /** used to retrieve the authentication secret described here: * [[https://tools.ietf.org/html/draft-ietf-webpush-encryption-01]] */ - val auth = "auth".asInstanceOf[PushEncryptionKeyName] + val auth: PushEncryptionKeyName = "auth".asInstanceOf[PushEncryptionKeyName] } diff --git a/src/main/scala/org/scalajs/dom/experimental/serviceworkers/ServiceWorkers.scala b/src/main/scala/org/scalajs/dom/experimental/serviceworkers/ServiceWorkers.scala index 5c33b9500..4a061f48f 100644 --- a/src/main/scala/org/scalajs/dom/experimental/serviceworkers/ServiceWorkers.scala +++ b/src/main/scala/org/scalajs/dom/experimental/serviceworkers/ServiceWorkers.scala @@ -17,7 +17,7 @@ object FrameType { /** The window client's global object's browsing context is an auxiliary browsing context. */ - val auxiliary = "auxiliary".asInstanceOf[FrameType] + val auxiliary: FrameType = "auxiliary".asInstanceOf[FrameType] /** The window client's global object's browsing context is a top-level browsing context. */ @@ -25,9 +25,9 @@ object FrameType { /** The window client's global object's browsing context is a nested browsing context. */ - val nested = "nested".asInstanceOf[FrameType] + val nested: FrameType = "nested".asInstanceOf[FrameType] - val none = "none".asInstanceOf[FrameType] + val none: FrameType = "none".asInstanceOf[FrameType] } /** [[https://slightlyoff.github.io/ServiceWorker/spec/service_worker_1/#client ¶4.2 Client]] of Service Workers 1 spec. @@ -383,39 +383,39 @@ object ServiceWorkerState { * resolves successfully. This is primarily used to ensure that the service worker is not active until all of the * core caches are populated. */ - val installing = "installing".asInstanceOf[ServiceWorkerState] + val installing: ServiceWorkerState = "installing".asInstanceOf[ServiceWorkerState] /** The service worker in this state is considered a waiting worker. */ - val installed = "installed".asInstanceOf[ServiceWorkerState] + val installed: ServiceWorkerState = "installed".asInstanceOf[ServiceWorkerState] /** The service worker in this state is considered an active worker. During this state, event.waitUntil(f) can be * called inside the onactivate event handler to extend the life of the active worker until the passed promise * resolves successfully. No functional events are dispatched until the state becomes activated. */ - val activating = "activating".asInstanceOf[ServiceWorkerState] + val activating: ServiceWorkerState = "activating".asInstanceOf[ServiceWorkerState] /** The service worker in this state is considered an active worker ready to handle functional events. */ - val activated = "activated".asInstanceOf[ServiceWorkerState] + val activated: ServiceWorkerState = "activated".asInstanceOf[ServiceWorkerState] /** A new service worker is replacing the current service worker, or the current service worker is being discarded due * to an install failure. */ - val redundant = "redundant".asInstanceOf[ServiceWorkerState] + val redundant: ServiceWorkerState = "redundant".asInstanceOf[ServiceWorkerState] } @js.native sealed trait ClientType extends js.Any object ClientType { - val window = "window".asInstanceOf[ClientType] + val window: ClientType = "window".asInstanceOf[ClientType] - val worker = "worker".asInstanceOf[ClientType] + val worker: ClientType = "worker".asInstanceOf[ClientType] - val sharedworker = "sharedworker".asInstanceOf[ClientType] + val sharedworker: ClientType = "sharedworker".asInstanceOf[ClientType] - val all = "all".asInstanceOf[ClientType] + val all: ClientType = "all".asInstanceOf[ClientType] } /** [[https://slightlyoff.github.io/ServiceWorker/spec/service_worker_1/#client ¶4.2 Client]] of Service Workers 1 spec. diff --git a/src/main/scala/org/scalajs/dom/experimental/webrtc/WebRTC.scala b/src/main/scala/org/scalajs/dom/experimental/webrtc/WebRTC.scala index 39fe6e3d0..b8eae545b 100644 --- a/src/main/scala/org/scalajs/dom/experimental/webrtc/WebRTC.scala +++ b/src/main/scala/org/scalajs/dom/experimental/webrtc/WebRTC.scala @@ -106,16 +106,16 @@ object RTCIceTransportPolicy { /** The ICE engine must not send or receive any packets at this point. */ - val none = "none".asInstanceOf[RTCIceTransportPolicy] + val none: RTCIceTransportPolicy = "none".asInstanceOf[RTCIceTransportPolicy] /** The ICE engine must only use media relay candidates such as candidates passing through a TURN server. This can be * used to reduce leakage of IP addresses in certain use cases. */ - val relay = "relay".asInstanceOf[RTCIceTransportPolicy] + val relay: RTCIceTransportPolicy = "relay".asInstanceOf[RTCIceTransportPolicy] /** The ICE engine may use any type of candidates when this value is specified. */ - val all = "all".asInstanceOf[RTCIceTransportPolicy] + val all: RTCIceTransportPolicy = "all".asInstanceOf[RTCIceTransportPolicy] } /** see [[https://www.w3.org/TR/2015/WD-webrtc-20150210/#idl-def-RTCBundlePolicy]] in W3C spec @@ -128,7 +128,7 @@ object RTCBundlePolicy { /** Gather ICE candidates for each media type in use (audio, video, and data). If the remote endpoint is not * BUNDLE-aware, negotiate only one audio and video track on separate transports. */ - val balanced = "balanced".asInstanceOf[RTCBundlePolicy] + val balanced: RTCBundlePolicy = "balanced".asInstanceOf[RTCBundlePolicy] /** Gather ICE candidates for each track. If the remote endpoint is not BUNDLE-aware, negotiate all media tracks on * separate transports. @@ -187,19 +187,19 @@ object RTCSdpType { /** An RTCSdpType of "offer" indicates that a description should be treated as an [SDP] offer. */ - val offer = "offer".asInstanceOf[RTCSdpType] + val offer: RTCSdpType = "offer".asInstanceOf[RTCSdpType] /** An RTCSdpType of "pranswer" indicates that a description should be treated as an [SDP] answer, but not a final * answer. A description used as an SDP "pranswer" may be applied as a response to a SDP offer, or an update to a * previously sent SDP "pranswer". */ - val pranswer = "pranswer".asInstanceOf[RTCSdpType] + val pranswer: RTCSdpType = "pranswer".asInstanceOf[RTCSdpType] /** An RTCSdpType of "answer" indicates that a description should be treated as an [SDP] final answer, and the * offer-answer exchange should be considered complete. A description used as an SDP answer may be applied as a * response to an SDP offer or as an update to a previously sent SDP "pranswer". */ - val answer = "answer".asInstanceOf[RTCSdpType] + val answer: RTCSdpType = "answer".asInstanceOf[RTCSdpType] } @js.native @@ -301,20 +301,20 @@ object RTCDataChannelState { /** The user agent is attempting to establish the underlying data transport. This is the initial state of a * RTCDataChannel object created with createDataChannel(). */ - val connecting = "connecting".asInstanceOf[RTCDataChannelState] + val connecting: RTCDataChannelState = "connecting".asInstanceOf[RTCDataChannelState] /** The underlying data transport is established and communication is possible. This is the initial state of a * RTCDataChannel object dispatched as a part of a RTCDataChannelEvent. */ - val open = "open".asInstanceOf[RTCDataChannelState] + val open: RTCDataChannelState = "open".asInstanceOf[RTCDataChannelState] /** The procedure to close down the underlying data transport has started. */ - val closing = "closing".asInstanceOf[RTCDataChannelState] + val closing: RTCDataChannelState = "closing".asInstanceOf[RTCDataChannelState] /** The underlying data transport has been closed or could not be established. */ - val closed = "closed".asInstanceOf[RTCDataChannelState] + val closed: RTCDataChannelState = "closed".asInstanceOf[RTCDataChannelState] } /** The RTCDataChannel interface represents a bi-directional data channel between two peers of a connection. @@ -562,36 +562,36 @@ object RTCIceConnectionState { /** The ICE Agent is gathering addresses and/or waiting for remote candidates to be supplied. */ - val `new` = "new".asInstanceOf[RTCIceConnectionState] + val `new`: RTCIceConnectionState = "new".asInstanceOf[RTCIceConnectionState] /** The ICE Agent has received remote candidates on at least one component, and is checking candidate pairs but has * not yet found a connection. In addition to checking, it may also still be gathering. */ - val checking = "checking".asInstanceOf[RTCIceConnectionState] + val checking: RTCIceConnectionState = "checking".asInstanceOf[RTCIceConnectionState] /** The ICE Agent has found a usable connection for all components but is still checking other candidate pairs to see * if there is a better connection. It may also still be gathering. */ - val connected = "connected".asInstanceOf[RTCIceConnectionState] + val connected: RTCIceConnectionState = "connected".asInstanceOf[RTCIceConnectionState] /** The ICE Agent has finished gathering and checking and found a connection for all components. Open issue: it is not * clear how the non controlling ICE side knows it is in the state. */ - val completed = "completed".asInstanceOf[RTCIceConnectionState] + val completed: RTCIceConnectionState = "completed".asInstanceOf[RTCIceConnectionState] /** The ICE Agent is finished checking all candidate pairs and failed to find a connection for at least one component. * Connections may have been found for some components. */ - val failed = "failed".asInstanceOf[RTCIceConnectionState] + val failed: RTCIceConnectionState = "failed".asInstanceOf[RTCIceConnectionState] /** Liveness checks have failed for one or more components. This is more aggressive than failed, and may trigger * intermittently (and resolve itself without action) on a flaky network. */ - val disconnected = "disconnected".asInstanceOf[RTCIceConnectionState] + val disconnected: RTCIceConnectionState = "disconnected".asInstanceOf[RTCIceConnectionState] /** The ICE Agent has shut down and is no longer responding to STUN requests. */ - val closed = "closed".asInstanceOf[RTCIceConnectionState] + val closed: RTCIceConnectionState = "closed".asInstanceOf[RTCIceConnectionState] } @js.native @@ -602,7 +602,7 @@ object RTCSignalingState { /** There is no offer­answer exchange in progress. This is also the initial state in which case the local and remote * descriptions are empty. */ - val stable = "stable".asInstanceOf[RTCSignalingState] + val stable: RTCSignalingState = "stable".asInstanceOf[RTCSignalingState] /** A local description, of type "offer", has been successfully applied. */ @@ -626,7 +626,7 @@ object RTCSignalingState { /** The connection is closed. */ - val closed = "closed".asInstanceOf[RTCSignalingState] + val closed: RTCSignalingState = "closed".asInstanceOf[RTCSignalingState] } @js.native @@ -636,16 +636,16 @@ object RTCIceGatheringState { /** The object was just created, and no networking has occurred yet. */ - val `new` = "new".asInstanceOf[RTCIceGatheringState] + val `new`: RTCIceGatheringState = "new".asInstanceOf[RTCIceGatheringState] /** The ICE engine is in the process of gathering candidates for this RTCPeerConnection. */ - val gathering = "gathering".asInstanceOf[RTCIceGatheringState] + val gathering: RTCIceGatheringState = "gathering".asInstanceOf[RTCIceGatheringState] /** The ICE engine has completed gathering. Events such as adding a new interface or a new TURN server will cause the * state to go back to gathering. */ - val complete = "complete".asInstanceOf[RTCIceGatheringState] + val complete: RTCIceGatheringState = "complete".asInstanceOf[RTCIceGatheringState] } trait MediaStreamEventInit extends EventInit { diff --git a/src/main/scala/org/scalajs/dom/ext/Extensions.scala b/src/main/scala/org/scalajs/dom/ext/Extensions.scala index 56e0942e0..2ac1018ff 100644 --- a/src/main/scala/org/scalajs/dom/ext/Extensions.scala +++ b/src/main/scala/org/scalajs/dom/ext/Extensions.scala @@ -14,7 +14,7 @@ import scala.scalajs.js.typedarray.TypedArrayBufferOps._ */ @deprecated("use the dom.fetch API instead", "2.0.0") case class AjaxException(xhr: dom.XMLHttpRequest) extends Exception { - def isTimeout = xhr.status == 0 && xhr.readyState == 4 + def isTimeout: Boolean = xhr.status == 0 && xhr.readyState == 4 } // This is just there to work around some weird warnings in Scala 3.x @@ -58,27 +58,27 @@ object Ajax { } def get(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, - withCredentials: Boolean = false, responseType: String = "") = { + withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] = { apply("GET", url, data, timeout, headers, withCredentials, responseType) } def post(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, - withCredentials: Boolean = false, responseType: String = "") = { + withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] = { apply("POST", url, data, timeout, headers, withCredentials, responseType) } def put(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, - withCredentials: Boolean = false, responseType: String = "") = { + withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] = { apply("PUT", url, data, timeout, headers, withCredentials, responseType) } def patch(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, - withCredentials: Boolean = false, responseType: String = "") = { + withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] = { apply("PATCH", url, data, timeout, headers, withCredentials, responseType) } def delete(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, - withCredentials: Boolean = false, responseType: String = "") = { + withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] = { apply("DELETE", url, data, timeout, headers, withCredentials, responseType) } diff --git a/src/main/scala/org/scalajs/dom/lib.scala b/src/main/scala/org/scalajs/dom/lib.scala index 469643c46..0bf9f5d99 100644 --- a/src/main/scala/org/scalajs/dom/lib.scala +++ b/src/main/scala/org/scalajs/dom/lib.scala @@ -6829,14 +6829,14 @@ object VisibilityState { * * MDN */ - val visible = "visible".asInstanceOf[VisibilityState] + val visible: VisibilityState = "visible".asInstanceOf[VisibilityState] /** The page content is not visible to the user. In practice this means that the document is either a background tab * or part of a minimized window, or the OS screen lock is active. * * MDN */ - val hidden = "hidden".asInstanceOf[VisibilityState] + val hidden: VisibilityState = "hidden".asInstanceOf[VisibilityState] /** the page content is being prerendered and is not visible to the user (considered hidden for purposes of * document.hidden). The document may start in this state, but will never transition to it from another value. Note: @@ -6844,13 +6844,13 @@ object VisibilityState { * * MDN */ - val prerender = "prerender".asInstanceOf[VisibilityState] + val prerender: VisibilityState = "prerender".asInstanceOf[VisibilityState] /** The page is being unloaded from memory. Note: browser support is optional. * * MDN */ - val unloaded = "unloaded".asInstanceOf[VisibilityState] + val unloaded: VisibilityState = "unloaded".asInstanceOf[VisibilityState] } /** The Clipboard interface implements the Clipboard API, providing—if the user grants permission—both read and write