[Wasm] IDL bindings improvements
- Generated types extend JsAny - Use JsAny instead of Dynamic - Use JsArray instead of Array - Use JsNumber, JsString and JsBoolean in JsAny context - Refactor dictionary constructor functions
This commit is contained in:
committed by
Space Team
parent
2a10cf3de2
commit
76b4498399
@@ -12,7 +12,7 @@ import kotlin.js.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
|
||||
public external interface WebGLContextAttributes {
|
||||
public external interface WebGLContextAttributes : JsAny {
|
||||
var alpha: Boolean? /* = true */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -39,63 +39,50 @@ public external interface WebGLContextAttributes {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun WebGLContextAttributes(alpha: Boolean? = true, depth: Boolean? = true, stencil: Boolean? = false, antialias: Boolean? = true, premultipliedAlpha: Boolean? = true, preserveDrawingBuffer: Boolean? = false, preferLowPowerToHighPerformance: Boolean? = false, failIfMajorPerformanceCaveat: Boolean? = false): WebGLContextAttributes {
|
||||
val o = newJsObject()
|
||||
o["alpha"] = alpha
|
||||
o["depth"] = depth
|
||||
o["stencil"] = stencil
|
||||
o["antialias"] = antialias
|
||||
o["premultipliedAlpha"] = premultipliedAlpha
|
||||
o["preserveDrawingBuffer"] = preserveDrawingBuffer
|
||||
o["preferLowPowerToHighPerformance"] = preferLowPowerToHighPerformance
|
||||
o["failIfMajorPerformanceCaveat"] = failIfMajorPerformanceCaveat
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as WebGLContextAttributes
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun WebGLContextAttributes(alpha: Boolean? = true, depth: Boolean? = true, stencil: Boolean? = false, antialias: Boolean? = true, premultipliedAlpha: Boolean? = true, preserveDrawingBuffer: Boolean? = false, preferLowPowerToHighPerformance: Boolean? = false, failIfMajorPerformanceCaveat: Boolean? = false): WebGLContextAttributes { js("return { alpha, depth, stencil, antialias, premultipliedAlpha, preserveDrawingBuffer, preferLowPowerToHighPerformance, failIfMajorPerformanceCaveat };") }
|
||||
|
||||
public external abstract class WebGLObject
|
||||
public external abstract class WebGLObject : JsAny
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLBuffer](https://developer.mozilla.org/en/docs/Web/API/WebGLBuffer) to Kotlin
|
||||
*/
|
||||
public external abstract class WebGLBuffer : WebGLObject
|
||||
public external abstract class WebGLBuffer : WebGLObject, JsAny
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLFramebuffer](https://developer.mozilla.org/en/docs/Web/API/WebGLFramebuffer) to Kotlin
|
||||
*/
|
||||
public external abstract class WebGLFramebuffer : WebGLObject
|
||||
public external abstract class WebGLFramebuffer : WebGLObject, JsAny
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLProgram](https://developer.mozilla.org/en/docs/Web/API/WebGLProgram) to Kotlin
|
||||
*/
|
||||
public external abstract class WebGLProgram : WebGLObject
|
||||
public external abstract class WebGLProgram : WebGLObject, JsAny
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLRenderbuffer](https://developer.mozilla.org/en/docs/Web/API/WebGLRenderbuffer) to Kotlin
|
||||
*/
|
||||
public external abstract class WebGLRenderbuffer : WebGLObject
|
||||
public external abstract class WebGLRenderbuffer : WebGLObject, JsAny
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLShader](https://developer.mozilla.org/en/docs/Web/API/WebGLShader) to Kotlin
|
||||
*/
|
||||
public external abstract class WebGLShader : WebGLObject
|
||||
public external abstract class WebGLShader : WebGLObject, JsAny
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLTexture](https://developer.mozilla.org/en/docs/Web/API/WebGLTexture) to Kotlin
|
||||
*/
|
||||
public external abstract class WebGLTexture : WebGLObject
|
||||
public external abstract class WebGLTexture : WebGLObject, JsAny
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLUniformLocation](https://developer.mozilla.org/en/docs/Web/API/WebGLUniformLocation) to Kotlin
|
||||
*/
|
||||
public external abstract class WebGLUniformLocation
|
||||
public external abstract class WebGLUniformLocation : JsAny
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLActiveInfo](https://developer.mozilla.org/en/docs/Web/API/WebGLActiveInfo) to Kotlin
|
||||
*/
|
||||
public external abstract class WebGLActiveInfo {
|
||||
public external abstract class WebGLActiveInfo : JsAny {
|
||||
open val size: Int
|
||||
open val type: Int
|
||||
open val name: String
|
||||
@@ -104,21 +91,21 @@ public external abstract class WebGLActiveInfo {
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLShaderPrecisionFormat](https://developer.mozilla.org/en/docs/Web/API/WebGLShaderPrecisionFormat) to Kotlin
|
||||
*/
|
||||
public external abstract class WebGLShaderPrecisionFormat {
|
||||
public external abstract class WebGLShaderPrecisionFormat : JsAny {
|
||||
open val rangeMin: Int
|
||||
open val rangeMax: Int
|
||||
open val precision: Int
|
||||
}
|
||||
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface WebGLRenderingContextBase {
|
||||
public external interface WebGLRenderingContextBase : JsAny {
|
||||
val canvas: HTMLCanvasElement
|
||||
val drawingBufferWidth: Int
|
||||
val drawingBufferHeight: Int
|
||||
fun getContextAttributes(): WebGLContextAttributes?
|
||||
fun isContextLost(): Boolean
|
||||
fun getSupportedExtensions(): Array<String>?
|
||||
fun getExtension(name: String): Dynamic?
|
||||
fun getSupportedExtensions(): JsArray<JsString>?
|
||||
fun getExtension(name: String): JsAny?
|
||||
fun activeTexture(texture: Int)
|
||||
fun attachShader(program: WebGLProgram?, shader: WebGLShader?)
|
||||
fun bindAttribLocation(program: WebGLProgram?, index: Int, name: String)
|
||||
@@ -176,23 +163,23 @@ public external interface WebGLRenderingContextBase {
|
||||
fun generateMipmap(target: Int)
|
||||
fun getActiveAttrib(program: WebGLProgram?, index: Int): WebGLActiveInfo?
|
||||
fun getActiveUniform(program: WebGLProgram?, index: Int): WebGLActiveInfo?
|
||||
fun getAttachedShaders(program: WebGLProgram?): Array<WebGLShader>?
|
||||
fun getAttachedShaders(program: WebGLProgram?): JsArray<WebGLShader>?
|
||||
fun getAttribLocation(program: WebGLProgram?, name: String): Int
|
||||
fun getBufferParameter(target: Int, pname: Int): Any?
|
||||
fun getParameter(pname: Int): Any?
|
||||
fun getBufferParameter(target: Int, pname: Int): JsAny?
|
||||
fun getParameter(pname: Int): JsAny?
|
||||
fun getError(): Int
|
||||
fun getFramebufferAttachmentParameter(target: Int, attachment: Int, pname: Int): Any?
|
||||
fun getProgramParameter(program: WebGLProgram?, pname: Int): Any?
|
||||
fun getFramebufferAttachmentParameter(target: Int, attachment: Int, pname: Int): JsAny?
|
||||
fun getProgramParameter(program: WebGLProgram?, pname: Int): JsAny?
|
||||
fun getProgramInfoLog(program: WebGLProgram?): String?
|
||||
fun getRenderbufferParameter(target: Int, pname: Int): Any?
|
||||
fun getShaderParameter(shader: WebGLShader?, pname: Int): Any?
|
||||
fun getRenderbufferParameter(target: Int, pname: Int): JsAny?
|
||||
fun getShaderParameter(shader: WebGLShader?, pname: Int): JsAny?
|
||||
fun getShaderPrecisionFormat(shadertype: Int, precisiontype: Int): WebGLShaderPrecisionFormat?
|
||||
fun getShaderInfoLog(shader: WebGLShader?): String?
|
||||
fun getShaderSource(shader: WebGLShader?): String?
|
||||
fun getTexParameter(target: Int, pname: Int): Any?
|
||||
fun getUniform(program: WebGLProgram?, location: WebGLUniformLocation?): Any?
|
||||
fun getTexParameter(target: Int, pname: Int): JsAny?
|
||||
fun getUniform(program: WebGLProgram?, location: WebGLUniformLocation?): JsAny?
|
||||
fun getUniformLocation(program: WebGLProgram?, name: String): WebGLUniformLocation?
|
||||
fun getVertexAttrib(index: Int, pname: Int): Any?
|
||||
fun getVertexAttrib(index: Int, pname: Int): JsAny?
|
||||
fun getVertexAttribOffset(index: Int, pname: Int): Int
|
||||
fun hint(target: Int, mode: Int)
|
||||
fun isBuffer(buffer: WebGLBuffer?): Boolean
|
||||
@@ -225,44 +212,44 @@ public external interface WebGLRenderingContextBase {
|
||||
fun texSubImage2D(target: Int, level: Int, xoffset: Int, yoffset: Int, format: Int, type: Int, source: TexImageSource?)
|
||||
fun uniform1f(location: WebGLUniformLocation?, x: Float)
|
||||
fun uniform1fv(location: WebGLUniformLocation?, v: Float32Array)
|
||||
fun uniform1fv(location: WebGLUniformLocation?, v: Array<Float>)
|
||||
fun uniform1fv(location: WebGLUniformLocation?, v: JsArray<JsNumber>)
|
||||
fun uniform1i(location: WebGLUniformLocation?, x: Int)
|
||||
fun uniform1iv(location: WebGLUniformLocation?, v: Int32Array)
|
||||
fun uniform1iv(location: WebGLUniformLocation?, v: Array<Int>)
|
||||
fun uniform1iv(location: WebGLUniformLocation?, v: JsArray<JsNumber>)
|
||||
fun uniform2f(location: WebGLUniformLocation?, x: Float, y: Float)
|
||||
fun uniform2fv(location: WebGLUniformLocation?, v: Float32Array)
|
||||
fun uniform2fv(location: WebGLUniformLocation?, v: Array<Float>)
|
||||
fun uniform2fv(location: WebGLUniformLocation?, v: JsArray<JsNumber>)
|
||||
fun uniform2i(location: WebGLUniformLocation?, x: Int, y: Int)
|
||||
fun uniform2iv(location: WebGLUniformLocation?, v: Int32Array)
|
||||
fun uniform2iv(location: WebGLUniformLocation?, v: Array<Int>)
|
||||
fun uniform2iv(location: WebGLUniformLocation?, v: JsArray<JsNumber>)
|
||||
fun uniform3f(location: WebGLUniformLocation?, x: Float, y: Float, z: Float)
|
||||
fun uniform3fv(location: WebGLUniformLocation?, v: Float32Array)
|
||||
fun uniform3fv(location: WebGLUniformLocation?, v: Array<Float>)
|
||||
fun uniform3fv(location: WebGLUniformLocation?, v: JsArray<JsNumber>)
|
||||
fun uniform3i(location: WebGLUniformLocation?, x: Int, y: Int, z: Int)
|
||||
fun uniform3iv(location: WebGLUniformLocation?, v: Int32Array)
|
||||
fun uniform3iv(location: WebGLUniformLocation?, v: Array<Int>)
|
||||
fun uniform3iv(location: WebGLUniformLocation?, v: JsArray<JsNumber>)
|
||||
fun uniform4f(location: WebGLUniformLocation?, x: Float, y: Float, z: Float, w: Float)
|
||||
fun uniform4fv(location: WebGLUniformLocation?, v: Float32Array)
|
||||
fun uniform4fv(location: WebGLUniformLocation?, v: Array<Float>)
|
||||
fun uniform4fv(location: WebGLUniformLocation?, v: JsArray<JsNumber>)
|
||||
fun uniform4i(location: WebGLUniformLocation?, x: Int, y: Int, z: Int, w: Int)
|
||||
fun uniform4iv(location: WebGLUniformLocation?, v: Int32Array)
|
||||
fun uniform4iv(location: WebGLUniformLocation?, v: Array<Int>)
|
||||
fun uniform4iv(location: WebGLUniformLocation?, v: JsArray<JsNumber>)
|
||||
fun uniformMatrix2fv(location: WebGLUniformLocation?, transpose: Boolean, value: Float32Array)
|
||||
fun uniformMatrix2fv(location: WebGLUniformLocation?, transpose: Boolean, value: Array<Float>)
|
||||
fun uniformMatrix2fv(location: WebGLUniformLocation?, transpose: Boolean, value: JsArray<JsNumber>)
|
||||
fun uniformMatrix3fv(location: WebGLUniformLocation?, transpose: Boolean, value: Float32Array)
|
||||
fun uniformMatrix3fv(location: WebGLUniformLocation?, transpose: Boolean, value: Array<Float>)
|
||||
fun uniformMatrix3fv(location: WebGLUniformLocation?, transpose: Boolean, value: JsArray<JsNumber>)
|
||||
fun uniformMatrix4fv(location: WebGLUniformLocation?, transpose: Boolean, value: Float32Array)
|
||||
fun uniformMatrix4fv(location: WebGLUniformLocation?, transpose: Boolean, value: Array<Float>)
|
||||
fun uniformMatrix4fv(location: WebGLUniformLocation?, transpose: Boolean, value: JsArray<JsNumber>)
|
||||
fun useProgram(program: WebGLProgram?)
|
||||
fun validateProgram(program: WebGLProgram?)
|
||||
fun vertexAttrib1f(index: Int, x: Float)
|
||||
fun vertexAttrib1fv(index: Int, values: Dynamic?)
|
||||
fun vertexAttrib1fv(index: Int, values: JsAny?)
|
||||
fun vertexAttrib2f(index: Int, x: Float, y: Float)
|
||||
fun vertexAttrib2fv(index: Int, values: Dynamic?)
|
||||
fun vertexAttrib2fv(index: Int, values: JsAny?)
|
||||
fun vertexAttrib3f(index: Int, x: Float, y: Float, z: Float)
|
||||
fun vertexAttrib3fv(index: Int, values: Dynamic?)
|
||||
fun vertexAttrib3fv(index: Int, values: JsAny?)
|
||||
fun vertexAttrib4f(index: Int, x: Float, y: Float, z: Float, w: Float)
|
||||
fun vertexAttrib4fv(index: Int, values: Dynamic?)
|
||||
fun vertexAttrib4fv(index: Int, values: JsAny?)
|
||||
fun vertexAttribPointer(index: Int, size: Int, type: Int, normalized: Boolean, stride: Int, offset: Int)
|
||||
fun viewport(x: Int, y: Int, width: Int, height: Int)
|
||||
|
||||
@@ -570,7 +557,7 @@ public external interface WebGLRenderingContextBase {
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLRenderingContext](https://developer.mozilla.org/en/docs/Web/API/WebGLRenderingContext) to Kotlin
|
||||
*/
|
||||
public external abstract class WebGLRenderingContext : WebGLRenderingContextBase, RenderingContext {
|
||||
public external abstract class WebGLRenderingContext : WebGLRenderingContextBase, RenderingContext, JsAny {
|
||||
companion object {
|
||||
val DEPTH_BUFFER_BIT: Int
|
||||
val STENCIL_BUFFER_BIT: Int
|
||||
@@ -875,7 +862,7 @@ public external abstract class WebGLRenderingContext : WebGLRenderingContextBase
|
||||
/**
|
||||
* Exposes the JavaScript [WebGLContextEvent](https://developer.mozilla.org/en/docs/Web/API/WebGLContextEvent) to Kotlin
|
||||
*/
|
||||
public external open class WebGLContextEvent(type: String, eventInit: WebGLContextEventInit = definedExternally) : Event {
|
||||
public external open class WebGLContextEvent(type: String, eventInit: WebGLContextEventInit = definedExternally) : Event, JsAny {
|
||||
open val statusMessage: String
|
||||
|
||||
companion object {
|
||||
@@ -886,40 +873,31 @@ public external open class WebGLContextEvent(type: String, eventInit: WebGLConte
|
||||
}
|
||||
}
|
||||
|
||||
public external interface WebGLContextEventInit : EventInit {
|
||||
public external interface WebGLContextEventInit : EventInit, JsAny {
|
||||
var statusMessage: String? /* = "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun WebGLContextEventInit(statusMessage: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): WebGLContextEventInit {
|
||||
val o = newJsObject()
|
||||
o["statusMessage"] = statusMessage
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as WebGLContextEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun WebGLContextEventInit(statusMessage: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): WebGLContextEventInit { js("return { statusMessage, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ArrayBuffer](https://developer.mozilla.org/en/docs/Web/API/ArrayBuffer) to Kotlin
|
||||
*/
|
||||
public external open class ArrayBuffer(length: Int) : BufferDataSource {
|
||||
public external open class ArrayBuffer(length: Int) : BufferDataSource, JsAny {
|
||||
open val byteLength: Int
|
||||
fun slice(begin: Int, end: Int = definedExternally): ArrayBuffer
|
||||
|
||||
companion object {
|
||||
fun isView(value: Any?): Boolean
|
||||
fun isView(value: JsAny?): Boolean
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ArrayBufferView](https://developer.mozilla.org/en/docs/Web/API/ArrayBufferView) to Kotlin
|
||||
*/
|
||||
public external interface ArrayBufferView : BufferDataSource {
|
||||
public external interface ArrayBufferView : BufferDataSource, JsAny {
|
||||
val buffer: ArrayBuffer
|
||||
val byteOffset: Int
|
||||
val byteLength: Int
|
||||
@@ -928,17 +906,17 @@ public external interface ArrayBufferView : BufferDataSource {
|
||||
/**
|
||||
* Exposes the JavaScript [Int8Array](https://developer.mozilla.org/en/docs/Web/API/Int8Array) to Kotlin
|
||||
*/
|
||||
public external open class Int8Array : ArrayBufferView {
|
||||
public external open class Int8Array : ArrayBufferView, JsAny {
|
||||
constructor(length: Int)
|
||||
constructor(array: Int8Array)
|
||||
constructor(array: Array<Byte>)
|
||||
constructor(array: JsArray<JsNumber>)
|
||||
constructor(buffer: ArrayBuffer, byteOffset: Int = definedExternally, length: Int = definedExternally)
|
||||
open val length: Int
|
||||
override val buffer: ArrayBuffer
|
||||
override val byteOffset: Int
|
||||
override val byteLength: Int
|
||||
fun set(array: Int8Array, offset: Int = definedExternally)
|
||||
fun set(array: Array<Byte>, offset: Int = definedExternally)
|
||||
fun set(array: JsArray<JsNumber>, offset: Int = definedExternally)
|
||||
fun subarray(start: Int, end: Int): Int8Array
|
||||
|
||||
companion object {
|
||||
@@ -946,28 +924,26 @@ public external open class Int8Array : ArrayBufferView {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Int8Array.get(index: Int): Byte = asDynamic().getByte(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Int8Array.set(index: Int, value: Byte) { asDynamic()[index] = value }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Uint8Array](https://developer.mozilla.org/en/docs/Web/API/Uint8Array) to Kotlin
|
||||
*/
|
||||
public external open class Uint8Array : ArrayBufferView {
|
||||
public external open class Uint8Array : ArrayBufferView, JsAny {
|
||||
constructor(length: Int)
|
||||
constructor(array: Uint8Array)
|
||||
constructor(array: Array<Byte>)
|
||||
constructor(array: JsArray<JsNumber>)
|
||||
constructor(buffer: ArrayBuffer, byteOffset: Int = definedExternally, length: Int = definedExternally)
|
||||
open val length: Int
|
||||
override val buffer: ArrayBuffer
|
||||
override val byteOffset: Int
|
||||
override val byteLength: Int
|
||||
fun set(array: Uint8Array, offset: Int = definedExternally)
|
||||
fun set(array: Array<Byte>, offset: Int = definedExternally)
|
||||
fun set(array: JsArray<JsNumber>, offset: Int = definedExternally)
|
||||
fun subarray(start: Int, end: Int): Uint8Array
|
||||
|
||||
companion object {
|
||||
@@ -975,28 +951,26 @@ public external open class Uint8Array : ArrayBufferView {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Uint8Array.get(index: Int): Byte = asDynamic().getByte(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Uint8Array.set(index: Int, value: Byte) { asDynamic()[index] = value }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Uint8ClampedArray](https://developer.mozilla.org/en/docs/Web/API/Uint8ClampedArray) to Kotlin
|
||||
*/
|
||||
public external open class Uint8ClampedArray : ArrayBufferView {
|
||||
public external open class Uint8ClampedArray : ArrayBufferView, JsAny {
|
||||
constructor(length: Int)
|
||||
constructor(array: Uint8ClampedArray)
|
||||
constructor(array: Array<Byte>)
|
||||
constructor(array: JsArray<JsNumber>)
|
||||
constructor(buffer: ArrayBuffer, byteOffset: Int = definedExternally, length: Int = definedExternally)
|
||||
open val length: Int
|
||||
override val buffer: ArrayBuffer
|
||||
override val byteOffset: Int
|
||||
override val byteLength: Int
|
||||
fun set(array: Uint8ClampedArray, offset: Int = definedExternally)
|
||||
fun set(array: Array<Byte>, offset: Int = definedExternally)
|
||||
fun set(array: JsArray<JsNumber>, offset: Int = definedExternally)
|
||||
fun subarray(start: Int, end: Int): Uint8ClampedArray
|
||||
|
||||
companion object {
|
||||
@@ -1004,28 +978,26 @@ public external open class Uint8ClampedArray : ArrayBufferView {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Uint8ClampedArray.get(index: Int): Byte = asDynamic().getByte(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Uint8ClampedArray.set(index: Int, value: Byte) { asDynamic()[index] = value }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Int16Array](https://developer.mozilla.org/en/docs/Web/API/Int16Array) to Kotlin
|
||||
*/
|
||||
public external open class Int16Array : ArrayBufferView {
|
||||
public external open class Int16Array : ArrayBufferView, JsAny {
|
||||
constructor(length: Int)
|
||||
constructor(array: Int16Array)
|
||||
constructor(array: Array<Short>)
|
||||
constructor(array: JsArray<JsNumber>)
|
||||
constructor(buffer: ArrayBuffer, byteOffset: Int = definedExternally, length: Int = definedExternally)
|
||||
open val length: Int
|
||||
override val buffer: ArrayBuffer
|
||||
override val byteOffset: Int
|
||||
override val byteLength: Int
|
||||
fun set(array: Int16Array, offset: Int = definedExternally)
|
||||
fun set(array: Array<Short>, offset: Int = definedExternally)
|
||||
fun set(array: JsArray<JsNumber>, offset: Int = definedExternally)
|
||||
fun subarray(start: Int, end: Int): Int16Array
|
||||
|
||||
companion object {
|
||||
@@ -1033,28 +1005,26 @@ public external open class Int16Array : ArrayBufferView {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Int16Array.get(index: Int): Short = asDynamic().getShort(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Int16Array.set(index: Int, value: Short) { asDynamic()[index] = value }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Uint16Array](https://developer.mozilla.org/en/docs/Web/API/Uint16Array) to Kotlin
|
||||
*/
|
||||
public external open class Uint16Array : ArrayBufferView {
|
||||
public external open class Uint16Array : ArrayBufferView, JsAny {
|
||||
constructor(length: Int)
|
||||
constructor(array: Uint16Array)
|
||||
constructor(array: Array<Short>)
|
||||
constructor(array: JsArray<JsNumber>)
|
||||
constructor(buffer: ArrayBuffer, byteOffset: Int = definedExternally, length: Int = definedExternally)
|
||||
open val length: Int
|
||||
override val buffer: ArrayBuffer
|
||||
override val byteOffset: Int
|
||||
override val byteLength: Int
|
||||
fun set(array: Uint16Array, offset: Int = definedExternally)
|
||||
fun set(array: Array<Short>, offset: Int = definedExternally)
|
||||
fun set(array: JsArray<JsNumber>, offset: Int = definedExternally)
|
||||
fun subarray(start: Int, end: Int): Uint16Array
|
||||
|
||||
companion object {
|
||||
@@ -1062,28 +1032,26 @@ public external open class Uint16Array : ArrayBufferView {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Uint16Array.get(index: Int): Short = asDynamic().getShort(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Uint16Array.set(index: Int, value: Short) { asDynamic()[index] = value }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Int32Array](https://developer.mozilla.org/en/docs/Web/API/Int32Array) to Kotlin
|
||||
*/
|
||||
public external open class Int32Array : ArrayBufferView {
|
||||
public external open class Int32Array : ArrayBufferView, JsAny {
|
||||
constructor(length: Int)
|
||||
constructor(array: Int32Array)
|
||||
constructor(array: Array<Int>)
|
||||
constructor(array: JsArray<JsNumber>)
|
||||
constructor(buffer: ArrayBuffer, byteOffset: Int = definedExternally, length: Int = definedExternally)
|
||||
open val length: Int
|
||||
override val buffer: ArrayBuffer
|
||||
override val byteOffset: Int
|
||||
override val byteLength: Int
|
||||
fun set(array: Int32Array, offset: Int = definedExternally)
|
||||
fun set(array: Array<Int>, offset: Int = definedExternally)
|
||||
fun set(array: JsArray<JsNumber>, offset: Int = definedExternally)
|
||||
fun subarray(start: Int, end: Int): Int32Array
|
||||
|
||||
companion object {
|
||||
@@ -1091,28 +1059,26 @@ public external open class Int32Array : ArrayBufferView {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Int32Array.get(index: Int): Int = asDynamic().getInt(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Int32Array.set(index: Int, value: Int) { asDynamic()[index] = value }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Uint32Array](https://developer.mozilla.org/en/docs/Web/API/Uint32Array) to Kotlin
|
||||
*/
|
||||
public external open class Uint32Array : ArrayBufferView {
|
||||
public external open class Uint32Array : ArrayBufferView, JsAny {
|
||||
constructor(length: Int)
|
||||
constructor(array: Uint32Array)
|
||||
constructor(array: Array<Int>)
|
||||
constructor(array: JsArray<JsNumber>)
|
||||
constructor(buffer: ArrayBuffer, byteOffset: Int = definedExternally, length: Int = definedExternally)
|
||||
open val length: Int
|
||||
override val buffer: ArrayBuffer
|
||||
override val byteOffset: Int
|
||||
override val byteLength: Int
|
||||
fun set(array: Uint32Array, offset: Int = definedExternally)
|
||||
fun set(array: Array<Int>, offset: Int = definedExternally)
|
||||
fun set(array: JsArray<JsNumber>, offset: Int = definedExternally)
|
||||
fun subarray(start: Int, end: Int): Uint32Array
|
||||
|
||||
companion object {
|
||||
@@ -1120,28 +1086,26 @@ public external open class Uint32Array : ArrayBufferView {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Uint32Array.get(index: Int): Int = asDynamic().getInt(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Uint32Array.set(index: Int, value: Int) { asDynamic()[index] = value }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Float32Array](https://developer.mozilla.org/en/docs/Web/API/Float32Array) to Kotlin
|
||||
*/
|
||||
public external open class Float32Array : ArrayBufferView {
|
||||
public external open class Float32Array : ArrayBufferView, JsAny {
|
||||
constructor(length: Int)
|
||||
constructor(array: Float32Array)
|
||||
constructor(array: Array<Float>)
|
||||
constructor(array: JsArray<JsNumber>)
|
||||
constructor(buffer: ArrayBuffer, byteOffset: Int = definedExternally, length: Int = definedExternally)
|
||||
open val length: Int
|
||||
override val buffer: ArrayBuffer
|
||||
override val byteOffset: Int
|
||||
override val byteLength: Int
|
||||
fun set(array: Float32Array, offset: Int = definedExternally)
|
||||
fun set(array: Array<Float>, offset: Int = definedExternally)
|
||||
fun set(array: JsArray<JsNumber>, offset: Int = definedExternally)
|
||||
fun subarray(start: Int, end: Int): Float32Array
|
||||
|
||||
companion object {
|
||||
@@ -1149,28 +1113,26 @@ public external open class Float32Array : ArrayBufferView {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Float32Array.get(index: Int): Float = asDynamic().getFloat(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Float32Array.set(index: Int, value: Float) { asDynamic()[index] = value }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Float64Array](https://developer.mozilla.org/en/docs/Web/API/Float64Array) to Kotlin
|
||||
*/
|
||||
public external open class Float64Array : ArrayBufferView {
|
||||
public external open class Float64Array : ArrayBufferView, JsAny {
|
||||
constructor(length: Int)
|
||||
constructor(array: Float64Array)
|
||||
constructor(array: Array<Double>)
|
||||
constructor(array: JsArray<JsNumber>)
|
||||
constructor(buffer: ArrayBuffer, byteOffset: Int = definedExternally, length: Int = definedExternally)
|
||||
open val length: Int
|
||||
override val buffer: ArrayBuffer
|
||||
override val byteOffset: Int
|
||||
override val byteLength: Int
|
||||
fun set(array: Float64Array, offset: Int = definedExternally)
|
||||
fun set(array: Array<Double>, offset: Int = definedExternally)
|
||||
fun set(array: JsArray<JsNumber>, offset: Int = definedExternally)
|
||||
fun subarray(start: Int, end: Int): Float64Array
|
||||
|
||||
companion object {
|
||||
@@ -1178,18 +1140,16 @@ public external open class Float64Array : ArrayBufferView {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Float64Array.get(index: Int): Double = asDynamic().getDouble(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun Float64Array.set(index: Int, value: Double) { asDynamic()[index] = value }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [DataView](https://developer.mozilla.org/en/docs/Web/API/DataView) to Kotlin
|
||||
*/
|
||||
public external open class DataView(buffer: ArrayBuffer, byteOffset: Int = definedExternally, byteLength: Int = definedExternally) : ArrayBufferView {
|
||||
public external open class DataView(buffer: ArrayBuffer, byteOffset: Int = definedExternally, byteLength: Int = definedExternally) : ArrayBufferView, JsAny {
|
||||
override val buffer: ArrayBuffer
|
||||
override val byteOffset: Int
|
||||
override val byteLength: Int
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.w3c.dom.svg.*
|
||||
/**
|
||||
* Exposes the JavaScript [SVGClipPathElement](https://developer.mozilla.org/en/docs/Web/API/SVGClipPathElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGClipPathElement : SVGElement, SVGUnitTypes {
|
||||
public external abstract class SVGClipPathElement : SVGElement, SVGUnitTypes, JsAny {
|
||||
open val clipPathUnits: SVGAnimatedEnumeration
|
||||
open val transform: SVGAnimatedTransformList
|
||||
|
||||
@@ -47,7 +47,7 @@ public external abstract class SVGClipPathElement : SVGElement, SVGUnitTypes {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGMaskElement](https://developer.mozilla.org/en/docs/Web/API/SVGMaskElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGMaskElement : SVGElement, SVGUnitTypes {
|
||||
public external abstract class SVGMaskElement : SVGElement, SVGUnitTypes, JsAny {
|
||||
open val maskUnits: SVGAnimatedEnumeration
|
||||
open val maskContentUnits: SVGAnimatedEnumeration
|
||||
open val x: SVGAnimatedLength
|
||||
|
||||
@@ -13,28 +13,19 @@ import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
|
||||
public external interface ClipboardEventInit : EventInit {
|
||||
public external interface ClipboardEventInit : EventInit, JsAny {
|
||||
var clipboardData: DataTransfer? /* = null */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ClipboardEventInit(clipboardData: DataTransfer? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ClipboardEventInit {
|
||||
val o = newJsObject()
|
||||
o["clipboardData"] = clipboardData
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ClipboardEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ClipboardEventInit(clipboardData: DataTransfer? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ClipboardEventInit { js("return { clipboardData, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ClipboardEvent](https://developer.mozilla.org/en/docs/Web/API/ClipboardEvent) to Kotlin
|
||||
*/
|
||||
public external open class ClipboardEvent(type: String, eventInitDict: ClipboardEventInit = definedExternally) : Event {
|
||||
public external open class ClipboardEvent(type: String, eventInitDict: ClipboardEventInit = definedExternally) : Event, JsAny {
|
||||
open val clipboardData: DataTransfer?
|
||||
|
||||
companion object {
|
||||
@@ -48,24 +39,18 @@ public external open class ClipboardEvent(type: String, eventInitDict: Clipboard
|
||||
/**
|
||||
* Exposes the JavaScript [Clipboard](https://developer.mozilla.org/en/docs/Web/API/Clipboard) to Kotlin
|
||||
*/
|
||||
public external abstract class Clipboard : EventTarget {
|
||||
public external abstract class Clipboard : EventTarget, JsAny {
|
||||
fun read(): Promise<DataTransfer>
|
||||
fun readText(): Promise<String>
|
||||
fun write(data: DataTransfer): Promise<Unit>
|
||||
fun writeText(data: String): Promise<Unit>
|
||||
fun readText(): Promise<JsString>
|
||||
fun write(data: DataTransfer): Promise<Nothing?>
|
||||
fun writeText(data: String): Promise<Nothing?>
|
||||
}
|
||||
|
||||
public external interface ClipboardPermissionDescriptor {
|
||||
public external interface ClipboardPermissionDescriptor : JsAny {
|
||||
var allowWithoutGesture: Boolean? /* = false */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ClipboardPermissionDescriptor(allowWithoutGesture: Boolean? = false): ClipboardPermissionDescriptor {
|
||||
val o = newJsObject()
|
||||
o["allowWithoutGesture"] = allowWithoutGesture
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ClipboardPermissionDescriptor
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ClipboardPermissionDescriptor(allowWithoutGesture: Boolean? = false): ClipboardPermissionDescriptor { js("return { allowWithoutGesture };") }
|
||||
@@ -12,21 +12,20 @@ import kotlin.js.*
|
||||
import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
|
||||
public external abstract class MediaList : ItemArrayLike<String> {
|
||||
public external abstract class MediaList : ItemArrayLike<JsString>, JsAny {
|
||||
open var mediaText: String
|
||||
fun appendMedium(medium: String)
|
||||
fun deleteMedium(medium: String)
|
||||
override fun item(index: Int): String?
|
||||
override fun item(index: Int): JsString?
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun MediaList.get(index: Int): String? = asDynamic().getString(index)
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [StyleSheet](https://developer.mozilla.org/en/docs/Web/API/StyleSheet) to Kotlin
|
||||
*/
|
||||
public external abstract class StyleSheet {
|
||||
public external abstract class StyleSheet : JsAny {
|
||||
open val type: String
|
||||
open val href: String?
|
||||
open val ownerNode: UnionElementOrProcessingInstruction?
|
||||
@@ -39,7 +38,7 @@ public external abstract class StyleSheet {
|
||||
/**
|
||||
* Exposes the JavaScript [CSSStyleSheet](https://developer.mozilla.org/en/docs/Web/API/CSSStyleSheet) to Kotlin
|
||||
*/
|
||||
public external abstract class CSSStyleSheet : StyleSheet {
|
||||
public external abstract class CSSStyleSheet : StyleSheet, JsAny {
|
||||
open val ownerRule: CSSRule?
|
||||
open val cssRules: CSSRuleList
|
||||
fun insertRule(rule: String, index: Int): Int
|
||||
@@ -49,18 +48,17 @@ public external abstract class CSSStyleSheet : StyleSheet {
|
||||
/**
|
||||
* Exposes the JavaScript [StyleSheetList](https://developer.mozilla.org/en/docs/Web/API/StyleSheetList) to Kotlin
|
||||
*/
|
||||
public external abstract class StyleSheetList : ItemArrayLike<StyleSheet> {
|
||||
public external abstract class StyleSheetList : ItemArrayLike<StyleSheet>, JsAny {
|
||||
override fun item(index: Int): StyleSheet?
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun StyleSheetList.get(index: Int): StyleSheet? = asDynamic().getAny(index)
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [LinkStyle](https://developer.mozilla.org/en/docs/Web/API/LinkStyle) to Kotlin
|
||||
*/
|
||||
public external interface LinkStyle {
|
||||
public external interface LinkStyle : JsAny {
|
||||
val sheet: StyleSheet?
|
||||
get() = definedExternally
|
||||
}
|
||||
@@ -68,18 +66,17 @@ public external interface LinkStyle {
|
||||
/**
|
||||
* Exposes the JavaScript [CSSRuleList](https://developer.mozilla.org/en/docs/Web/API/CSSRuleList) to Kotlin
|
||||
*/
|
||||
public external abstract class CSSRuleList : ItemArrayLike<CSSRule> {
|
||||
public external abstract class CSSRuleList : ItemArrayLike<CSSRule>, JsAny {
|
||||
override fun item(index: Int): CSSRule?
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun CSSRuleList.get(index: Int): CSSRule? = asDynamic().getAny(index)
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [CSSRule](https://developer.mozilla.org/en/docs/Web/API/CSSRule) to Kotlin
|
||||
*/
|
||||
public external abstract class CSSRule {
|
||||
public external abstract class CSSRule : JsAny {
|
||||
open val type: Short
|
||||
open var cssText: String
|
||||
open val parentRule: CSSRule?
|
||||
@@ -100,7 +97,7 @@ public external abstract class CSSRule {
|
||||
/**
|
||||
* Exposes the JavaScript [CSSStyleRule](https://developer.mozilla.org/en/docs/Web/API/CSSStyleRule) to Kotlin
|
||||
*/
|
||||
public external abstract class CSSStyleRule : CSSRule {
|
||||
public external abstract class CSSStyleRule : CSSRule, JsAny {
|
||||
open var selectorText: String
|
||||
open val style: CSSStyleDeclaration
|
||||
|
||||
@@ -116,7 +113,7 @@ public external abstract class CSSStyleRule : CSSRule {
|
||||
}
|
||||
}
|
||||
|
||||
public external abstract class CSSImportRule : CSSRule {
|
||||
public external abstract class CSSImportRule : CSSRule, JsAny {
|
||||
open val href: String
|
||||
open val media: MediaList
|
||||
open val styleSheet: CSSStyleSheet
|
||||
@@ -136,7 +133,7 @@ public external abstract class CSSImportRule : CSSRule {
|
||||
/**
|
||||
* Exposes the JavaScript [CSSGroupingRule](https://developer.mozilla.org/en/docs/Web/API/CSSGroupingRule) to Kotlin
|
||||
*/
|
||||
public external abstract class CSSGroupingRule : CSSRule {
|
||||
public external abstract class CSSGroupingRule : CSSRule, JsAny {
|
||||
open val cssRules: CSSRuleList
|
||||
fun insertRule(rule: String, index: Int): Int
|
||||
fun deleteRule(index: Int)
|
||||
@@ -156,7 +153,7 @@ public external abstract class CSSGroupingRule : CSSRule {
|
||||
/**
|
||||
* Exposes the JavaScript [CSSMediaRule](https://developer.mozilla.org/en/docs/Web/API/CSSMediaRule) to Kotlin
|
||||
*/
|
||||
public external abstract class CSSMediaRule : CSSGroupingRule {
|
||||
public external abstract class CSSMediaRule : CSSGroupingRule, JsAny {
|
||||
open val media: MediaList
|
||||
|
||||
companion object {
|
||||
@@ -174,7 +171,7 @@ public external abstract class CSSMediaRule : CSSGroupingRule {
|
||||
/**
|
||||
* Exposes the JavaScript [CSSPageRule](https://developer.mozilla.org/en/docs/Web/API/CSSPageRule) to Kotlin
|
||||
*/
|
||||
public external abstract class CSSPageRule : CSSGroupingRule {
|
||||
public external abstract class CSSPageRule : CSSGroupingRule, JsAny {
|
||||
open var selectorText: String
|
||||
open val style: CSSStyleDeclaration
|
||||
|
||||
@@ -190,7 +187,7 @@ public external abstract class CSSPageRule : CSSGroupingRule {
|
||||
}
|
||||
}
|
||||
|
||||
public external abstract class CSSMarginRule : CSSRule {
|
||||
public external abstract class CSSMarginRule : CSSRule, JsAny {
|
||||
open val name: String
|
||||
open val style: CSSStyleDeclaration
|
||||
|
||||
@@ -209,7 +206,7 @@ public external abstract class CSSMarginRule : CSSRule {
|
||||
/**
|
||||
* Exposes the JavaScript [CSSNamespaceRule](https://developer.mozilla.org/en/docs/Web/API/CSSNamespaceRule) to Kotlin
|
||||
*/
|
||||
public external abstract class CSSNamespaceRule : CSSRule {
|
||||
public external abstract class CSSNamespaceRule : CSSRule, JsAny {
|
||||
open val namespaceURI: String
|
||||
open val prefix: String
|
||||
|
||||
@@ -228,7 +225,7 @@ public external abstract class CSSNamespaceRule : CSSRule {
|
||||
/**
|
||||
* Exposes the JavaScript [CSSStyleDeclaration](https://developer.mozilla.org/en/docs/Web/API/CSSStyleDeclaration) to Kotlin
|
||||
*/
|
||||
public external abstract class CSSStyleDeclaration : ItemArrayLike<String> {
|
||||
public external abstract class CSSStyleDeclaration : ItemArrayLike<JsString>, JsAny {
|
||||
open var cssText: String
|
||||
open val parentRule: CSSRule?
|
||||
open var cssFloat: String
|
||||
@@ -464,21 +461,20 @@ public external abstract class CSSStyleDeclaration : ItemArrayLike<String> {
|
||||
fun setPropertyValue(property: String, value: String)
|
||||
fun setPropertyPriority(property: String, priority: String)
|
||||
fun removeProperty(property: String): String
|
||||
override fun item(index: Int): String
|
||||
override fun item(index: Int): JsString
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun CSSStyleDeclaration.get(index: Int): String? = asDynamic().getString(index)
|
||||
|
||||
public external interface ElementCSSInlineStyle {
|
||||
public external interface ElementCSSInlineStyle : JsAny {
|
||||
val style: CSSStyleDeclaration
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [CSS](https://developer.mozilla.org/en/docs/Web/API/CSS) to Kotlin
|
||||
*/
|
||||
public external abstract class CSS {
|
||||
public external abstract class CSS : JsAny {
|
||||
companion object {
|
||||
fun escape(ident: String): String
|
||||
}
|
||||
|
||||
@@ -16,17 +16,17 @@ import org.w3c.dom.events.*
|
||||
/**
|
||||
* Exposes the JavaScript [MediaKeySystemConfiguration](https://developer.mozilla.org/en/docs/Web/API/MediaKeySystemConfiguration) to Kotlin
|
||||
*/
|
||||
public external interface MediaKeySystemConfiguration {
|
||||
public external interface MediaKeySystemConfiguration : JsAny {
|
||||
var label: String? /* = "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var initDataTypes: Array<String>? /* = arrayOf() */
|
||||
var initDataTypes: JsArray<JsString>? /* = arrayOf() */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var audioCapabilities: Array<MediaKeySystemMediaCapability>? /* = arrayOf() */
|
||||
var audioCapabilities: JsArray<MediaKeySystemMediaCapability>? /* = arrayOf() */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var videoCapabilities: Array<MediaKeySystemMediaCapability>? /* = arrayOf() */
|
||||
var videoCapabilities: JsArray<MediaKeySystemMediaCapability>? /* = arrayOf() */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var distinctiveIdentifier: MediaKeysRequirement? /* = MediaKeysRequirement.OPTIONAL */
|
||||
@@ -35,27 +35,15 @@ public external interface MediaKeySystemConfiguration {
|
||||
var persistentState: MediaKeysRequirement? /* = MediaKeysRequirement.OPTIONAL */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sessionTypes: Array<String>?
|
||||
var sessionTypes: JsArray<JsString>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaKeySystemConfiguration(label: String? = "", initDataTypes: Array<String>? = arrayOf(), audioCapabilities: Array<MediaKeySystemMediaCapability>? = arrayOf(), videoCapabilities: Array<MediaKeySystemMediaCapability>? = arrayOf(), distinctiveIdentifier: MediaKeysRequirement? = MediaKeysRequirement.OPTIONAL, persistentState: MediaKeysRequirement? = MediaKeysRequirement.OPTIONAL, sessionTypes: Array<String>? = undefined): MediaKeySystemConfiguration {
|
||||
val o = newJsObject()
|
||||
o["label"] = label
|
||||
o["initDataTypes"] = initDataTypes
|
||||
o["audioCapabilities"] = audioCapabilities
|
||||
o["videoCapabilities"] = videoCapabilities
|
||||
o["distinctiveIdentifier"] = distinctiveIdentifier
|
||||
o["persistentState"] = persistentState
|
||||
o["sessionTypes"] = sessionTypes
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaKeySystemConfiguration
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaKeySystemConfiguration(label: String? = "", initDataTypes: JsArray<JsString>? = JsArray(), audioCapabilities: JsArray<MediaKeySystemMediaCapability>? = JsArray(), videoCapabilities: JsArray<MediaKeySystemMediaCapability>? = JsArray(), distinctiveIdentifier: MediaKeysRequirement? = MediaKeysRequirement.OPTIONAL, persistentState: MediaKeysRequirement? = MediaKeysRequirement.OPTIONAL, sessionTypes: JsArray<JsString>? = undefined): MediaKeySystemConfiguration { js("return { label, initDataTypes, audioCapabilities, videoCapabilities, distinctiveIdentifier, persistentState, sessionTypes };") }
|
||||
|
||||
public external interface MediaKeySystemMediaCapability {
|
||||
public external interface MediaKeySystemMediaCapability : JsAny {
|
||||
var contentType: String? /* = "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -64,20 +52,13 @@ public external interface MediaKeySystemMediaCapability {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaKeySystemMediaCapability(contentType: String? = "", robustness: String? = ""): MediaKeySystemMediaCapability {
|
||||
val o = newJsObject()
|
||||
o["contentType"] = contentType
|
||||
o["robustness"] = robustness
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaKeySystemMediaCapability
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaKeySystemMediaCapability(contentType: String? = "", robustness: String? = ""): MediaKeySystemMediaCapability { js("return { contentType, robustness };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MediaKeySystemAccess](https://developer.mozilla.org/en/docs/Web/API/MediaKeySystemAccess) to Kotlin
|
||||
*/
|
||||
public external abstract class MediaKeySystemAccess {
|
||||
public external abstract class MediaKeySystemAccess : JsAny {
|
||||
open val keySystem: String
|
||||
fun getConfiguration(): MediaKeySystemConfiguration
|
||||
fun createMediaKeys(): Promise<MediaKeys>
|
||||
@@ -86,41 +67,41 @@ public external abstract class MediaKeySystemAccess {
|
||||
/**
|
||||
* Exposes the JavaScript [MediaKeys](https://developer.mozilla.org/en/docs/Web/API/MediaKeys) to Kotlin
|
||||
*/
|
||||
public external abstract class MediaKeys {
|
||||
public external abstract class MediaKeys : JsAny {
|
||||
fun createSession(sessionType: MediaKeySessionType = definedExternally): MediaKeySession
|
||||
fun setServerCertificate(serverCertificate: Dynamic?): Promise<Boolean>
|
||||
fun setServerCertificate(serverCertificate: JsAny?): Promise<JsBoolean>
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MediaKeySession](https://developer.mozilla.org/en/docs/Web/API/MediaKeySession) to Kotlin
|
||||
*/
|
||||
public external abstract class MediaKeySession : EventTarget {
|
||||
public external abstract class MediaKeySession : EventTarget, JsAny {
|
||||
open val sessionId: String
|
||||
open val expiration: Double
|
||||
open val closed: Promise<Unit>
|
||||
open val closed: Promise<Nothing?>
|
||||
open val keyStatuses: MediaKeyStatusMap
|
||||
open var onkeystatuseschange: ((Event) -> Dynamic?)?
|
||||
open var onmessage: ((MessageEvent) -> Dynamic?)?
|
||||
fun generateRequest(initDataType: String, initData: Dynamic?): Promise<Unit>
|
||||
fun load(sessionId: String): Promise<Boolean>
|
||||
fun update(response: Dynamic?): Promise<Unit>
|
||||
fun close(): Promise<Unit>
|
||||
fun remove(): Promise<Unit>
|
||||
fun generateRequest(initDataType: String, initData: JsAny?): Promise<Nothing?>
|
||||
fun load(sessionId: String): Promise<JsBoolean>
|
||||
fun update(response: JsAny?): Promise<Nothing?>
|
||||
fun close(): Promise<Nothing?>
|
||||
fun remove(): Promise<Nothing?>
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MediaKeyStatusMap](https://developer.mozilla.org/en/docs/Web/API/MediaKeyStatusMap) to Kotlin
|
||||
*/
|
||||
public external abstract class MediaKeyStatusMap {
|
||||
public external abstract class MediaKeyStatusMap : JsAny {
|
||||
open val size: Int
|
||||
fun has(keyId: Dynamic?): Boolean
|
||||
fun get(keyId: Dynamic?): Any?
|
||||
fun has(keyId: JsAny?): Boolean
|
||||
fun get(keyId: JsAny?): JsAny?
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MediaKeyMessageEvent](https://developer.mozilla.org/en/docs/Web/API/MediaKeyMessageEvent) to Kotlin
|
||||
*/
|
||||
public external open class MediaKeyMessageEvent(type: String, eventInitDict: MediaKeyMessageEventInit) : Event {
|
||||
public external open class MediaKeyMessageEvent(type: String, eventInitDict: MediaKeyMessageEventInit) : Event, JsAny {
|
||||
open val messageType: MediaKeyMessageType
|
||||
open val message: ArrayBuffer
|
||||
|
||||
@@ -132,25 +113,15 @@ public external open class MediaKeyMessageEvent(type: String, eventInitDict: Med
|
||||
}
|
||||
}
|
||||
|
||||
public external interface MediaKeyMessageEventInit : EventInit {
|
||||
public external interface MediaKeyMessageEventInit : EventInit, JsAny {
|
||||
var messageType: MediaKeyMessageType?
|
||||
var message: ArrayBuffer?
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaKeyMessageEventInit(messageType: MediaKeyMessageType?, message: ArrayBuffer?, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaKeyMessageEventInit {
|
||||
val o = newJsObject()
|
||||
o["messageType"] = messageType
|
||||
o["message"] = message
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaKeyMessageEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaKeyMessageEventInit(messageType: MediaKeyMessageType?, message: ArrayBuffer?, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaKeyMessageEventInit { js("return { messageType, message, bubbles, cancelable, composed };") }
|
||||
|
||||
public external open class MediaEncryptedEvent(type: String, eventInitDict: MediaEncryptedEventInit = definedExternally) : Event {
|
||||
public external open class MediaEncryptedEvent(type: String, eventInitDict: MediaEncryptedEventInit = definedExternally) : Event, JsAny {
|
||||
open val initDataType: String
|
||||
open val initData: ArrayBuffer?
|
||||
|
||||
@@ -162,7 +133,7 @@ public external open class MediaEncryptedEvent(type: String, eventInitDict: Medi
|
||||
}
|
||||
}
|
||||
|
||||
public external interface MediaEncryptedEventInit : EventInit {
|
||||
public external interface MediaEncryptedEventInit : EventInit, JsAny {
|
||||
var initDataType: String? /* = "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -171,23 +142,13 @@ public external interface MediaEncryptedEventInit : EventInit {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaEncryptedEventInit(initDataType: String? = "", initData: ArrayBuffer? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaEncryptedEventInit {
|
||||
val o = newJsObject()
|
||||
o["initDataType"] = initDataType
|
||||
o["initData"] = initData
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaEncryptedEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaEncryptedEventInit(initDataType: String? = "", initData: ArrayBuffer? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaEncryptedEventInit { js("return { initDataType, initData, bubbles, cancelable, composed };") }
|
||||
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface MediaKeysRequirement {
|
||||
public external interface MediaKeysRequirement : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -200,7 +161,7 @@ public inline val MediaKeysRequirement.Companion.NOT_ALLOWED: MediaKeysRequireme
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface MediaKeySessionType {
|
||||
public external interface MediaKeySessionType : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -211,7 +172,7 @@ public inline val MediaKeySessionType.Companion.PERSISTENT_LICENSE: MediaKeySess
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface MediaKeyStatus {
|
||||
public external interface MediaKeyStatus : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -232,7 +193,7 @@ public inline val MediaKeyStatus.Companion.INTERNAL_ERROR: MediaKeyStatus get()
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface MediaKeyMessageType {
|
||||
public external interface MediaKeyMessageType : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.w3c.dom.*
|
||||
/**
|
||||
* Exposes the JavaScript [UIEvent](https://developer.mozilla.org/en/docs/Web/API/UIEvent) to Kotlin
|
||||
*/
|
||||
public external open class UIEvent(type: String, eventInitDict: UIEventInit = definedExternally) : Event {
|
||||
public external open class UIEvent(type: String, eventInitDict: UIEventInit = definedExternally) : Event, JsAny {
|
||||
open val view: Window?
|
||||
open val detail: Int
|
||||
|
||||
@@ -27,7 +27,7 @@ public external open class UIEvent(type: String, eventInitDict: UIEventInit = de
|
||||
}
|
||||
}
|
||||
|
||||
public external interface UIEventInit : EventInit {
|
||||
public external interface UIEventInit : EventInit, JsAny {
|
||||
var view: Window? /* = null */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -36,23 +36,13 @@ public external interface UIEventInit : EventInit {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun UIEventInit(view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): UIEventInit {
|
||||
val o = newJsObject()
|
||||
o["view"] = view
|
||||
o["detail"] = detail
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as UIEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun UIEventInit(view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): UIEventInit { js("return { view, detail, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [FocusEvent](https://developer.mozilla.org/en/docs/Web/API/FocusEvent) to Kotlin
|
||||
*/
|
||||
public external open class FocusEvent(type: String, eventInitDict: FocusEventInit = definedExternally) : UIEvent {
|
||||
public external open class FocusEvent(type: String, eventInitDict: FocusEventInit = definedExternally) : UIEvent, JsAny {
|
||||
open val relatedTarget: EventTarget?
|
||||
|
||||
companion object {
|
||||
@@ -63,30 +53,19 @@ public external open class FocusEvent(type: String, eventInitDict: FocusEventIni
|
||||
}
|
||||
}
|
||||
|
||||
public external interface FocusEventInit : UIEventInit {
|
||||
public external interface FocusEventInit : UIEventInit, JsAny {
|
||||
var relatedTarget: EventTarget? /* = null */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun FocusEventInit(relatedTarget: EventTarget? = null, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): FocusEventInit {
|
||||
val o = newJsObject()
|
||||
o["relatedTarget"] = relatedTarget
|
||||
o["view"] = view
|
||||
o["detail"] = detail
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as FocusEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun FocusEventInit(relatedTarget: EventTarget? = null, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): FocusEventInit { js("return { relatedTarget, view, detail, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MouseEvent](https://developer.mozilla.org/en/docs/Web/API/MouseEvent) to Kotlin
|
||||
*/
|
||||
public external open class MouseEvent(type: String, eventInitDict: MouseEventInit = definedExternally) : UIEvent, UnionElementOrMouseEvent {
|
||||
public external open class MouseEvent(type: String, eventInitDict: MouseEventInit = definedExternally) : UIEvent, UnionElementOrMouseEvent, JsAny {
|
||||
open val screenX: Int
|
||||
open val screenY: Int
|
||||
open val clientX: Int
|
||||
@@ -115,7 +94,7 @@ public external open class MouseEvent(type: String, eventInitDict: MouseEventIni
|
||||
}
|
||||
}
|
||||
|
||||
public external interface MouseEventInit : EventModifierInit {
|
||||
public external interface MouseEventInit : EventModifierInit, JsAny {
|
||||
var screenX: Int? /* = 0 */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -142,42 +121,10 @@ public external interface MouseEventInit : EventModifierInit {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MouseEventInit(screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MouseEventInit {
|
||||
val o = newJsObject()
|
||||
o["screenX"] = screenX
|
||||
o["screenY"] = screenY
|
||||
o["clientX"] = clientX
|
||||
o["clientY"] = clientY
|
||||
o["button"] = button
|
||||
o["buttons"] = buttons
|
||||
o["relatedTarget"] = relatedTarget
|
||||
o["region"] = region
|
||||
o["ctrlKey"] = ctrlKey
|
||||
o["shiftKey"] = shiftKey
|
||||
o["altKey"] = altKey
|
||||
o["metaKey"] = metaKey
|
||||
o["modifierAltGraph"] = modifierAltGraph
|
||||
o["modifierCapsLock"] = modifierCapsLock
|
||||
o["modifierFn"] = modifierFn
|
||||
o["modifierFnLock"] = modifierFnLock
|
||||
o["modifierHyper"] = modifierHyper
|
||||
o["modifierNumLock"] = modifierNumLock
|
||||
o["modifierScrollLock"] = modifierScrollLock
|
||||
o["modifierSuper"] = modifierSuper
|
||||
o["modifierSymbol"] = modifierSymbol
|
||||
o["modifierSymbolLock"] = modifierSymbolLock
|
||||
o["view"] = view
|
||||
o["detail"] = detail
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MouseEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MouseEventInit(screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MouseEventInit { js("return { screenX, screenY, clientX, clientY, button, buttons, relatedTarget, region, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable, composed };") }
|
||||
|
||||
public external interface EventModifierInit : UIEventInit {
|
||||
public external interface EventModifierInit : UIEventInit, JsAny {
|
||||
var ctrlKey: Boolean? /* = false */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -222,37 +169,13 @@ public external interface EventModifierInit : UIEventInit {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun EventModifierInit(ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): EventModifierInit {
|
||||
val o = newJsObject()
|
||||
o["ctrlKey"] = ctrlKey
|
||||
o["shiftKey"] = shiftKey
|
||||
o["altKey"] = altKey
|
||||
o["metaKey"] = metaKey
|
||||
o["modifierAltGraph"] = modifierAltGraph
|
||||
o["modifierCapsLock"] = modifierCapsLock
|
||||
o["modifierFn"] = modifierFn
|
||||
o["modifierFnLock"] = modifierFnLock
|
||||
o["modifierHyper"] = modifierHyper
|
||||
o["modifierNumLock"] = modifierNumLock
|
||||
o["modifierScrollLock"] = modifierScrollLock
|
||||
o["modifierSuper"] = modifierSuper
|
||||
o["modifierSymbol"] = modifierSymbol
|
||||
o["modifierSymbolLock"] = modifierSymbolLock
|
||||
o["view"] = view
|
||||
o["detail"] = detail
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as EventModifierInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun EventModifierInit(ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): EventModifierInit { js("return { ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [WheelEvent](https://developer.mozilla.org/en/docs/Web/API/WheelEvent) to Kotlin
|
||||
*/
|
||||
public external open class WheelEvent(type: String, eventInitDict: WheelEventInit = definedExternally) : MouseEvent {
|
||||
public external open class WheelEvent(type: String, eventInitDict: WheelEventInit = definedExternally) : MouseEvent, JsAny {
|
||||
open val deltaX: Double
|
||||
open val deltaY: Double
|
||||
open val deltaZ: Double
|
||||
@@ -269,7 +192,7 @@ public external open class WheelEvent(type: String, eventInitDict: WheelEventIni
|
||||
}
|
||||
}
|
||||
|
||||
public external interface WheelEventInit : MouseEventInit {
|
||||
public external interface WheelEventInit : MouseEventInit, JsAny {
|
||||
var deltaX: Double? /* = 0.0 */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -284,49 +207,13 @@ public external interface WheelEventInit : MouseEventInit {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun WheelEventInit(deltaX: Double? = 0.0, deltaY: Double? = 0.0, deltaZ: Double? = 0.0, deltaMode: Int? = 0, screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): WheelEventInit {
|
||||
val o = newJsObject()
|
||||
o["deltaX"] = deltaX
|
||||
o["deltaY"] = deltaY
|
||||
o["deltaZ"] = deltaZ
|
||||
o["deltaMode"] = deltaMode
|
||||
o["screenX"] = screenX
|
||||
o["screenY"] = screenY
|
||||
o["clientX"] = clientX
|
||||
o["clientY"] = clientY
|
||||
o["button"] = button
|
||||
o["buttons"] = buttons
|
||||
o["relatedTarget"] = relatedTarget
|
||||
o["region"] = region
|
||||
o["ctrlKey"] = ctrlKey
|
||||
o["shiftKey"] = shiftKey
|
||||
o["altKey"] = altKey
|
||||
o["metaKey"] = metaKey
|
||||
o["modifierAltGraph"] = modifierAltGraph
|
||||
o["modifierCapsLock"] = modifierCapsLock
|
||||
o["modifierFn"] = modifierFn
|
||||
o["modifierFnLock"] = modifierFnLock
|
||||
o["modifierHyper"] = modifierHyper
|
||||
o["modifierNumLock"] = modifierNumLock
|
||||
o["modifierScrollLock"] = modifierScrollLock
|
||||
o["modifierSuper"] = modifierSuper
|
||||
o["modifierSymbol"] = modifierSymbol
|
||||
o["modifierSymbolLock"] = modifierSymbolLock
|
||||
o["view"] = view
|
||||
o["detail"] = detail
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as WheelEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun WheelEventInit(deltaX: Double? = 0.0, deltaY: Double? = 0.0, deltaZ: Double? = 0.0, deltaMode: Int? = 0, screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): WheelEventInit { js("return { deltaX, deltaY, deltaZ, deltaMode, screenX, screenY, clientX, clientY, button, buttons, relatedTarget, region, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [InputEvent](https://developer.mozilla.org/en/docs/Web/API/InputEvent) to Kotlin
|
||||
*/
|
||||
public external open class InputEvent(type: String, eventInitDict: InputEventInit = definedExternally) : UIEvent {
|
||||
public external open class InputEvent(type: String, eventInitDict: InputEventInit = definedExternally) : UIEvent, JsAny {
|
||||
open val data: String
|
||||
open val isComposing: Boolean
|
||||
|
||||
@@ -338,7 +225,7 @@ public external open class InputEvent(type: String, eventInitDict: InputEventIni
|
||||
}
|
||||
}
|
||||
|
||||
public external interface InputEventInit : UIEventInit {
|
||||
public external interface InputEventInit : UIEventInit, JsAny {
|
||||
var data: String? /* = "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -347,25 +234,13 @@ public external interface InputEventInit : UIEventInit {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun InputEventInit(data: String? = "", isComposing: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): InputEventInit {
|
||||
val o = newJsObject()
|
||||
o["data"] = data
|
||||
o["isComposing"] = isComposing
|
||||
o["view"] = view
|
||||
o["detail"] = detail
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as InputEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun InputEventInit(data: String? = "", isComposing: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): InputEventInit { js("return { data, isComposing, view, detail, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [KeyboardEvent](https://developer.mozilla.org/en/docs/Web/API/KeyboardEvent) to Kotlin
|
||||
*/
|
||||
public external open class KeyboardEvent(type: String, eventInitDict: KeyboardEventInit = definedExternally) : UIEvent {
|
||||
public external open class KeyboardEvent(type: String, eventInitDict: KeyboardEventInit = definedExternally) : UIEvent, JsAny {
|
||||
open val key: String
|
||||
open val code: String
|
||||
open val location: Int
|
||||
@@ -392,7 +267,7 @@ public external open class KeyboardEvent(type: String, eventInitDict: KeyboardEv
|
||||
}
|
||||
}
|
||||
|
||||
public external interface KeyboardEventInit : EventModifierInit {
|
||||
public external interface KeyboardEventInit : EventModifierInit, JsAny {
|
||||
var key: String? /* = "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -410,42 +285,13 @@ public external interface KeyboardEventInit : EventModifierInit {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun KeyboardEventInit(key: String? = "", code: String? = "", location: Int? = 0, repeat: Boolean? = false, isComposing: Boolean? = false, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): KeyboardEventInit {
|
||||
val o = newJsObject()
|
||||
o["key"] = key
|
||||
o["code"] = code
|
||||
o["location"] = location
|
||||
o["repeat"] = repeat
|
||||
o["isComposing"] = isComposing
|
||||
o["ctrlKey"] = ctrlKey
|
||||
o["shiftKey"] = shiftKey
|
||||
o["altKey"] = altKey
|
||||
o["metaKey"] = metaKey
|
||||
o["modifierAltGraph"] = modifierAltGraph
|
||||
o["modifierCapsLock"] = modifierCapsLock
|
||||
o["modifierFn"] = modifierFn
|
||||
o["modifierFnLock"] = modifierFnLock
|
||||
o["modifierHyper"] = modifierHyper
|
||||
o["modifierNumLock"] = modifierNumLock
|
||||
o["modifierScrollLock"] = modifierScrollLock
|
||||
o["modifierSuper"] = modifierSuper
|
||||
o["modifierSymbol"] = modifierSymbol
|
||||
o["modifierSymbolLock"] = modifierSymbolLock
|
||||
o["view"] = view
|
||||
o["detail"] = detail
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as KeyboardEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun KeyboardEventInit(key: String? = "", code: String? = "", location: Int? = 0, repeat: Boolean? = false, isComposing: Boolean? = false, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): KeyboardEventInit { js("return { key, code, location, repeat, isComposing, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [CompositionEvent](https://developer.mozilla.org/en/docs/Web/API/CompositionEvent) to Kotlin
|
||||
*/
|
||||
public external open class CompositionEvent(type: String, eventInitDict: CompositionEventInit = definedExternally) : UIEvent {
|
||||
public external open class CompositionEvent(type: String, eventInitDict: CompositionEventInit = definedExternally) : UIEvent, JsAny {
|
||||
open val data: String
|
||||
|
||||
companion object {
|
||||
@@ -456,30 +302,19 @@ public external open class CompositionEvent(type: String, eventInitDict: Composi
|
||||
}
|
||||
}
|
||||
|
||||
public external interface CompositionEventInit : UIEventInit {
|
||||
public external interface CompositionEventInit : UIEventInit, JsAny {
|
||||
var data: String? /* = "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun CompositionEventInit(data: String? = "", view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): CompositionEventInit {
|
||||
val o = newJsObject()
|
||||
o["data"] = data
|
||||
o["view"] = view
|
||||
o["detail"] = detail
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as CompositionEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun CompositionEventInit(data: String? = "", view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): CompositionEventInit { js("return { data, view, detail, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Event](https://developer.mozilla.org/en/docs/Web/API/Event) to Kotlin
|
||||
*/
|
||||
public external open class Event(type: String, eventInitDict: EventInit = definedExternally) {
|
||||
public external open class Event(type: String, eventInitDict: EventInit = definedExternally) : JsAny {
|
||||
open val type: String
|
||||
open val target: EventTarget?
|
||||
open val currentTarget: EventTarget?
|
||||
@@ -489,8 +324,8 @@ public external open class Event(type: String, eventInitDict: EventInit = define
|
||||
open val defaultPrevented: Boolean
|
||||
open val composed: Boolean
|
||||
open val isTrusted: Boolean
|
||||
open val timeStamp: Number
|
||||
fun composedPath(): Array<EventTarget>
|
||||
open val timeStamp: JsNumber
|
||||
fun composedPath(): JsArray<EventTarget>
|
||||
fun stopPropagation()
|
||||
fun stopImmediatePropagation()
|
||||
fun preventDefault()
|
||||
@@ -507,17 +342,17 @@ public external open class Event(type: String, eventInitDict: EventInit = define
|
||||
/**
|
||||
* Exposes the JavaScript [EventTarget](https://developer.mozilla.org/en/docs/Web/API/EventTarget) to Kotlin
|
||||
*/
|
||||
public external abstract class EventTarget {
|
||||
fun addEventListener(type: String, callback: EventListener?, options: Dynamic? = definedExternally)
|
||||
fun addEventListener(type: String, callback: ((Event) -> Unit)?, options: Dynamic? = definedExternally)
|
||||
fun removeEventListener(type: String, callback: EventListener?, options: Dynamic? = definedExternally)
|
||||
fun removeEventListener(type: String, callback: ((Event) -> Unit)?, options: Dynamic? = definedExternally)
|
||||
public external abstract class EventTarget : JsAny {
|
||||
fun addEventListener(type: String, callback: EventListener?, options: JsAny? = definedExternally)
|
||||
fun addEventListener(type: String, callback: ((Event) -> Unit)?, options: JsAny? = definedExternally)
|
||||
fun removeEventListener(type: String, callback: EventListener?, options: JsAny? = definedExternally)
|
||||
fun removeEventListener(type: String, callback: ((Event) -> Unit)?, options: JsAny? = definedExternally)
|
||||
fun dispatchEvent(event: Event): Boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [EventListener](https://developer.mozilla.org/en/docs/Web/API/EventListener) to Kotlin
|
||||
*/
|
||||
public external interface EventListener {
|
||||
public external interface EventListener : JsAny {
|
||||
fun handleEvent(event: Event)
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,16 +16,16 @@ import org.w3c.dom.events.*
|
||||
/**
|
||||
* Exposes the JavaScript [MediaStream](https://developer.mozilla.org/en/docs/Web/API/MediaStream) to Kotlin
|
||||
*/
|
||||
public external open class MediaStream() : EventTarget, MediaProvider {
|
||||
public external open class MediaStream() : EventTarget, MediaProvider, JsAny {
|
||||
constructor(stream: MediaStream)
|
||||
constructor(tracks: Array<MediaStreamTrack>)
|
||||
constructor(tracks: JsArray<MediaStreamTrack>)
|
||||
open val id: String
|
||||
open val active: Boolean
|
||||
var onaddtrack: ((MediaStreamTrackEvent) -> Dynamic?)?
|
||||
var onremovetrack: ((MediaStreamTrackEvent) -> Dynamic?)?
|
||||
fun getAudioTracks(): Array<MediaStreamTrack>
|
||||
fun getVideoTracks(): Array<MediaStreamTrack>
|
||||
fun getTracks(): Array<MediaStreamTrack>
|
||||
fun getAudioTracks(): JsArray<MediaStreamTrack>
|
||||
fun getVideoTracks(): JsArray<MediaStreamTrack>
|
||||
fun getTracks(): JsArray<MediaStreamTrack>
|
||||
fun getTrackById(trackId: String): MediaStreamTrack?
|
||||
fun addTrack(track: MediaStreamTrack)
|
||||
fun removeTrack(track: MediaStreamTrack)
|
||||
@@ -35,7 +35,7 @@ public external open class MediaStream() : EventTarget, MediaProvider {
|
||||
/**
|
||||
* Exposes the JavaScript [MediaStreamTrack](https://developer.mozilla.org/en/docs/Web/API/MediaStreamTrack) to Kotlin
|
||||
*/
|
||||
public external abstract class MediaStreamTrack : EventTarget {
|
||||
public external abstract class MediaStreamTrack : EventTarget, JsAny {
|
||||
open val kind: String
|
||||
open val id: String
|
||||
open val label: String
|
||||
@@ -51,13 +51,13 @@ public external abstract class MediaStreamTrack : EventTarget {
|
||||
fun getCapabilities(): MediaTrackCapabilities
|
||||
fun getConstraints(): MediaTrackConstraints
|
||||
fun getSettings(): MediaTrackSettings
|
||||
fun applyConstraints(constraints: MediaTrackConstraints = definedExternally): Promise<Unit>
|
||||
fun applyConstraints(constraints: MediaTrackConstraints = definedExternally): Promise<Nothing?>
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MediaTrackSupportedConstraints](https://developer.mozilla.org/en/docs/Web/API/MediaTrackSupportedConstraints) to Kotlin
|
||||
*/
|
||||
public external interface MediaTrackSupportedConstraints {
|
||||
public external interface MediaTrackSupportedConstraints : JsAny {
|
||||
var width: Boolean? /* = true */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -108,31 +108,10 @@ public external interface MediaTrackSupportedConstraints {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaTrackSupportedConstraints(width: Boolean? = true, height: Boolean? = true, aspectRatio: Boolean? = true, frameRate: Boolean? = true, facingMode: Boolean? = true, resizeMode: Boolean? = true, volume: Boolean? = true, sampleRate: Boolean? = true, sampleSize: Boolean? = true, echoCancellation: Boolean? = true, autoGainControl: Boolean? = true, noiseSuppression: Boolean? = true, latency: Boolean? = true, channelCount: Boolean? = true, deviceId: Boolean? = true, groupId: Boolean? = true): MediaTrackSupportedConstraints {
|
||||
val o = newJsObject()
|
||||
o["width"] = width
|
||||
o["height"] = height
|
||||
o["aspectRatio"] = aspectRatio
|
||||
o["frameRate"] = frameRate
|
||||
o["facingMode"] = facingMode
|
||||
o["resizeMode"] = resizeMode
|
||||
o["volume"] = volume
|
||||
o["sampleRate"] = sampleRate
|
||||
o["sampleSize"] = sampleSize
|
||||
o["echoCancellation"] = echoCancellation
|
||||
o["autoGainControl"] = autoGainControl
|
||||
o["noiseSuppression"] = noiseSuppression
|
||||
o["latency"] = latency
|
||||
o["channelCount"] = channelCount
|
||||
o["deviceId"] = deviceId
|
||||
o["groupId"] = groupId
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaTrackSupportedConstraints
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaTrackSupportedConstraints(width: Boolean? = true, height: Boolean? = true, aspectRatio: Boolean? = true, frameRate: Boolean? = true, facingMode: Boolean? = true, resizeMode: Boolean? = true, volume: Boolean? = true, sampleRate: Boolean? = true, sampleSize: Boolean? = true, echoCancellation: Boolean? = true, autoGainControl: Boolean? = true, noiseSuppression: Boolean? = true, latency: Boolean? = true, channelCount: Boolean? = true, deviceId: Boolean? = true, groupId: Boolean? = true): MediaTrackSupportedConstraints { js("return { width, height, aspectRatio, frameRate, facingMode, resizeMode, volume, sampleRate, sampleSize, echoCancellation, autoGainControl, noiseSuppression, latency, channelCount, deviceId, groupId };") }
|
||||
|
||||
public external interface MediaTrackCapabilities {
|
||||
public external interface MediaTrackCapabilities : JsAny {
|
||||
var width: ULongRange?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -145,10 +124,10 @@ public external interface MediaTrackCapabilities {
|
||||
var frameRate: DoubleRange?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var facingMode: Array<String>?
|
||||
var facingMode: JsArray<JsString>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var resizeMode: Array<String>?
|
||||
var resizeMode: JsArray<JsString>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var volume: DoubleRange?
|
||||
@@ -160,13 +139,13 @@ public external interface MediaTrackCapabilities {
|
||||
var sampleSize: ULongRange?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var echoCancellation: Array<Boolean>?
|
||||
var echoCancellation: JsArray<JsBoolean>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var autoGainControl: Array<Boolean>?
|
||||
var autoGainControl: JsArray<JsBoolean>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var noiseSuppression: Array<Boolean>?
|
||||
var noiseSuppression: JsArray<JsBoolean>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var latency: DoubleRange?
|
||||
@@ -183,143 +162,79 @@ public external interface MediaTrackCapabilities {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaTrackCapabilities(width: ULongRange? = undefined, height: ULongRange? = undefined, aspectRatio: DoubleRange? = undefined, frameRate: DoubleRange? = undefined, facingMode: Array<String>? = undefined, resizeMode: Array<String>? = undefined, volume: DoubleRange? = undefined, sampleRate: ULongRange? = undefined, sampleSize: ULongRange? = undefined, echoCancellation: Array<Boolean>? = undefined, autoGainControl: Array<Boolean>? = undefined, noiseSuppression: Array<Boolean>? = undefined, latency: DoubleRange? = undefined, channelCount: ULongRange? = undefined, deviceId: String? = undefined, groupId: String? = undefined): MediaTrackCapabilities {
|
||||
val o = newJsObject()
|
||||
o["width"] = width
|
||||
o["height"] = height
|
||||
o["aspectRatio"] = aspectRatio
|
||||
o["frameRate"] = frameRate
|
||||
o["facingMode"] = facingMode
|
||||
o["resizeMode"] = resizeMode
|
||||
o["volume"] = volume
|
||||
o["sampleRate"] = sampleRate
|
||||
o["sampleSize"] = sampleSize
|
||||
o["echoCancellation"] = echoCancellation
|
||||
o["autoGainControl"] = autoGainControl
|
||||
o["noiseSuppression"] = noiseSuppression
|
||||
o["latency"] = latency
|
||||
o["channelCount"] = channelCount
|
||||
o["deviceId"] = deviceId
|
||||
o["groupId"] = groupId
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaTrackCapabilities
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaTrackCapabilities(width: ULongRange? = undefined, height: ULongRange? = undefined, aspectRatio: DoubleRange? = undefined, frameRate: DoubleRange? = undefined, facingMode: JsArray<JsString>? = undefined, resizeMode: JsArray<JsString>? = undefined, volume: DoubleRange? = undefined, sampleRate: ULongRange? = undefined, sampleSize: ULongRange? = undefined, echoCancellation: JsArray<JsBoolean>? = undefined, autoGainControl: JsArray<JsBoolean>? = undefined, noiseSuppression: JsArray<JsBoolean>? = undefined, latency: DoubleRange? = undefined, channelCount: ULongRange? = undefined, deviceId: String? = undefined, groupId: String? = undefined): MediaTrackCapabilities { js("return { width, height, aspectRatio, frameRate, facingMode, resizeMode, volume, sampleRate, sampleSize, echoCancellation, autoGainControl, noiseSuppression, latency, channelCount, deviceId, groupId };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MediaTrackConstraints](https://developer.mozilla.org/en/docs/Web/API/MediaTrackConstraints) to Kotlin
|
||||
*/
|
||||
public external interface MediaTrackConstraints : MediaTrackConstraintSet {
|
||||
var advanced: Array<MediaTrackConstraintSet>?
|
||||
public external interface MediaTrackConstraints : MediaTrackConstraintSet, JsAny {
|
||||
var advanced: JsArray<MediaTrackConstraintSet>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaTrackConstraints(advanced: Array<MediaTrackConstraintSet>? = undefined, width: Dynamic? = undefined, height: Dynamic? = undefined, aspectRatio: Dynamic? = undefined, frameRate: Dynamic? = undefined, facingMode: Dynamic? = undefined, resizeMode: Dynamic? = undefined, volume: Dynamic? = undefined, sampleRate: Dynamic? = undefined, sampleSize: Dynamic? = undefined, echoCancellation: Dynamic? = undefined, autoGainControl: Dynamic? = undefined, noiseSuppression: Dynamic? = undefined, latency: Dynamic? = undefined, channelCount: Dynamic? = undefined, deviceId: Dynamic? = undefined, groupId: Dynamic? = undefined): MediaTrackConstraints {
|
||||
val o = newJsObject()
|
||||
o["advanced"] = advanced
|
||||
o["width"] = width
|
||||
o["height"] = height
|
||||
o["aspectRatio"] = aspectRatio
|
||||
o["frameRate"] = frameRate
|
||||
o["facingMode"] = facingMode
|
||||
o["resizeMode"] = resizeMode
|
||||
o["volume"] = volume
|
||||
o["sampleRate"] = sampleRate
|
||||
o["sampleSize"] = sampleSize
|
||||
o["echoCancellation"] = echoCancellation
|
||||
o["autoGainControl"] = autoGainControl
|
||||
o["noiseSuppression"] = noiseSuppression
|
||||
o["latency"] = latency
|
||||
o["channelCount"] = channelCount
|
||||
o["deviceId"] = deviceId
|
||||
o["groupId"] = groupId
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaTrackConstraints
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaTrackConstraints(advanced: JsArray<MediaTrackConstraintSet>? = undefined, width: JsAny? = undefined, height: JsAny? = undefined, aspectRatio: JsAny? = undefined, frameRate: JsAny? = undefined, facingMode: JsAny? = undefined, resizeMode: JsAny? = undefined, volume: JsAny? = undefined, sampleRate: JsAny? = undefined, sampleSize: JsAny? = undefined, echoCancellation: JsAny? = undefined, autoGainControl: JsAny? = undefined, noiseSuppression: JsAny? = undefined, latency: JsAny? = undefined, channelCount: JsAny? = undefined, deviceId: JsAny? = undefined, groupId: JsAny? = undefined): MediaTrackConstraints { js("return { advanced, width, height, aspectRatio, frameRate, facingMode, resizeMode, volume, sampleRate, sampleSize, echoCancellation, autoGainControl, noiseSuppression, latency, channelCount, deviceId, groupId };") }
|
||||
|
||||
public external interface MediaTrackConstraintSet {
|
||||
var width: Dynamic?
|
||||
public external interface MediaTrackConstraintSet : JsAny {
|
||||
var width: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var height: Dynamic?
|
||||
var height: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var aspectRatio: Dynamic?
|
||||
var aspectRatio: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var frameRate: Dynamic?
|
||||
var frameRate: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var facingMode: Dynamic?
|
||||
var facingMode: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var resizeMode: Dynamic?
|
||||
var resizeMode: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var volume: Dynamic?
|
||||
var volume: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sampleRate: Dynamic?
|
||||
var sampleRate: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var sampleSize: Dynamic?
|
||||
var sampleSize: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var echoCancellation: Dynamic?
|
||||
var echoCancellation: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var autoGainControl: Dynamic?
|
||||
var autoGainControl: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var noiseSuppression: Dynamic?
|
||||
var noiseSuppression: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var latency: Dynamic?
|
||||
var latency: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var channelCount: Dynamic?
|
||||
var channelCount: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var deviceId: Dynamic?
|
||||
var deviceId: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var groupId: Dynamic?
|
||||
var groupId: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaTrackConstraintSet(width: Dynamic? = undefined, height: Dynamic? = undefined, aspectRatio: Dynamic? = undefined, frameRate: Dynamic? = undefined, facingMode: Dynamic? = undefined, resizeMode: Dynamic? = undefined, volume: Dynamic? = undefined, sampleRate: Dynamic? = undefined, sampleSize: Dynamic? = undefined, echoCancellation: Dynamic? = undefined, autoGainControl: Dynamic? = undefined, noiseSuppression: Dynamic? = undefined, latency: Dynamic? = undefined, channelCount: Dynamic? = undefined, deviceId: Dynamic? = undefined, groupId: Dynamic? = undefined): MediaTrackConstraintSet {
|
||||
val o = newJsObject()
|
||||
o["width"] = width
|
||||
o["height"] = height
|
||||
o["aspectRatio"] = aspectRatio
|
||||
o["frameRate"] = frameRate
|
||||
o["facingMode"] = facingMode
|
||||
o["resizeMode"] = resizeMode
|
||||
o["volume"] = volume
|
||||
o["sampleRate"] = sampleRate
|
||||
o["sampleSize"] = sampleSize
|
||||
o["echoCancellation"] = echoCancellation
|
||||
o["autoGainControl"] = autoGainControl
|
||||
o["noiseSuppression"] = noiseSuppression
|
||||
o["latency"] = latency
|
||||
o["channelCount"] = channelCount
|
||||
o["deviceId"] = deviceId
|
||||
o["groupId"] = groupId
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaTrackConstraintSet
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaTrackConstraintSet(width: JsAny? = undefined, height: JsAny? = undefined, aspectRatio: JsAny? = undefined, frameRate: JsAny? = undefined, facingMode: JsAny? = undefined, resizeMode: JsAny? = undefined, volume: JsAny? = undefined, sampleRate: JsAny? = undefined, sampleSize: JsAny? = undefined, echoCancellation: JsAny? = undefined, autoGainControl: JsAny? = undefined, noiseSuppression: JsAny? = undefined, latency: JsAny? = undefined, channelCount: JsAny? = undefined, deviceId: JsAny? = undefined, groupId: JsAny? = undefined): MediaTrackConstraintSet { js("return { width, height, aspectRatio, frameRate, facingMode, resizeMode, volume, sampleRate, sampleSize, echoCancellation, autoGainControl, noiseSuppression, latency, channelCount, deviceId, groupId };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MediaTrackSettings](https://developer.mozilla.org/en/docs/Web/API/MediaTrackSettings) to Kotlin
|
||||
*/
|
||||
public external interface MediaTrackSettings {
|
||||
public external interface MediaTrackSettings : JsAny {
|
||||
var width: Int?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -370,34 +285,13 @@ public external interface MediaTrackSettings {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaTrackSettings(width: Int? = undefined, height: Int? = undefined, aspectRatio: Double? = undefined, frameRate: Double? = undefined, facingMode: String? = undefined, resizeMode: String? = undefined, volume: Double? = undefined, sampleRate: Int? = undefined, sampleSize: Int? = undefined, echoCancellation: Boolean? = undefined, autoGainControl: Boolean? = undefined, noiseSuppression: Boolean? = undefined, latency: Double? = undefined, channelCount: Int? = undefined, deviceId: String? = undefined, groupId: String? = undefined): MediaTrackSettings {
|
||||
val o = newJsObject()
|
||||
o["width"] = width
|
||||
o["height"] = height
|
||||
o["aspectRatio"] = aspectRatio
|
||||
o["frameRate"] = frameRate
|
||||
o["facingMode"] = facingMode
|
||||
o["resizeMode"] = resizeMode
|
||||
o["volume"] = volume
|
||||
o["sampleRate"] = sampleRate
|
||||
o["sampleSize"] = sampleSize
|
||||
o["echoCancellation"] = echoCancellation
|
||||
o["autoGainControl"] = autoGainControl
|
||||
o["noiseSuppression"] = noiseSuppression
|
||||
o["latency"] = latency
|
||||
o["channelCount"] = channelCount
|
||||
o["deviceId"] = deviceId
|
||||
o["groupId"] = groupId
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaTrackSettings
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaTrackSettings(width: Int? = undefined, height: Int? = undefined, aspectRatio: Double? = undefined, frameRate: Double? = undefined, facingMode: String? = undefined, resizeMode: String? = undefined, volume: Double? = undefined, sampleRate: Int? = undefined, sampleSize: Int? = undefined, echoCancellation: Boolean? = undefined, autoGainControl: Boolean? = undefined, noiseSuppression: Boolean? = undefined, latency: Double? = undefined, channelCount: Int? = undefined, deviceId: String? = undefined, groupId: String? = undefined): MediaTrackSettings { js("return { width, height, aspectRatio, frameRate, facingMode, resizeMode, volume, sampleRate, sampleSize, echoCancellation, autoGainControl, noiseSuppression, latency, channelCount, deviceId, groupId };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MediaStreamTrackEvent](https://developer.mozilla.org/en/docs/Web/API/MediaStreamTrackEvent) to Kotlin
|
||||
*/
|
||||
public external open class MediaStreamTrackEvent(type: String, eventInitDict: MediaStreamTrackEventInit) : Event {
|
||||
public external open class MediaStreamTrackEvent(type: String, eventInitDict: MediaStreamTrackEventInit) : Event, JsAny {
|
||||
open val track: MediaStreamTrack
|
||||
|
||||
companion object {
|
||||
@@ -408,24 +302,15 @@ public external open class MediaStreamTrackEvent(type: String, eventInitDict: Me
|
||||
}
|
||||
}
|
||||
|
||||
public external interface MediaStreamTrackEventInit : EventInit {
|
||||
public external interface MediaStreamTrackEventInit : EventInit, JsAny {
|
||||
var track: MediaStreamTrack?
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaStreamTrackEventInit(track: MediaStreamTrack?, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaStreamTrackEventInit {
|
||||
val o = newJsObject()
|
||||
o["track"] = track
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaStreamTrackEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaStreamTrackEventInit(track: MediaStreamTrack?, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaStreamTrackEventInit { js("return { track, bubbles, cancelable, composed };") }
|
||||
|
||||
public external open class OverconstrainedErrorEvent(type: String, eventInitDict: OverconstrainedErrorEventInit) : Event {
|
||||
open val error: Dynamic?
|
||||
public external open class OverconstrainedErrorEvent(type: String, eventInitDict: OverconstrainedErrorEventInit) : Event, JsAny {
|
||||
open val error: JsAny?
|
||||
|
||||
companion object {
|
||||
val NONE: Short
|
||||
@@ -435,30 +320,21 @@ public external open class OverconstrainedErrorEvent(type: String, eventInitDict
|
||||
}
|
||||
}
|
||||
|
||||
public external interface OverconstrainedErrorEventInit : EventInit {
|
||||
var error: Dynamic? /* = null */
|
||||
public external interface OverconstrainedErrorEventInit : EventInit, JsAny {
|
||||
var error: JsAny? /* = null */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun OverconstrainedErrorEventInit(error: Dynamic? = null.unsafeCast<Dynamic?>(), bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): OverconstrainedErrorEventInit {
|
||||
val o = newJsObject()
|
||||
o["error"] = error
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as OverconstrainedErrorEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun OverconstrainedErrorEventInit(error: JsAny? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): OverconstrainedErrorEventInit { js("return { error, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MediaDevices](https://developer.mozilla.org/en/docs/Web/API/MediaDevices) to Kotlin
|
||||
*/
|
||||
public external abstract class MediaDevices : EventTarget {
|
||||
public external abstract class MediaDevices : EventTarget, JsAny {
|
||||
open var ondevicechange: ((Event) -> Dynamic?)?
|
||||
fun enumerateDevices(): Promise<Array<MediaDeviceInfo>>
|
||||
fun enumerateDevices(): Promise<JsArray<MediaDeviceInfo>>
|
||||
fun getSupportedConstraints(): MediaTrackSupportedConstraints
|
||||
fun getUserMedia(constraints: MediaStreamConstraints = definedExternally): Promise<MediaStream>
|
||||
}
|
||||
@@ -466,54 +342,47 @@ public external abstract class MediaDevices : EventTarget {
|
||||
/**
|
||||
* Exposes the JavaScript [MediaDeviceInfo](https://developer.mozilla.org/en/docs/Web/API/MediaDeviceInfo) to Kotlin
|
||||
*/
|
||||
public external abstract class MediaDeviceInfo {
|
||||
public external abstract class MediaDeviceInfo : JsAny {
|
||||
open val deviceId: String
|
||||
open val kind: MediaDeviceKind
|
||||
open val label: String
|
||||
open val groupId: String
|
||||
fun toJSON(): Dynamic?
|
||||
fun toJSON(): JsAny
|
||||
}
|
||||
|
||||
public external abstract class InputDeviceInfo : MediaDeviceInfo {
|
||||
public external abstract class InputDeviceInfo : MediaDeviceInfo, JsAny {
|
||||
fun getCapabilities(): MediaTrackCapabilities
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [MediaStreamConstraints](https://developer.mozilla.org/en/docs/Web/API/MediaStreamConstraints) to Kotlin
|
||||
*/
|
||||
public external interface MediaStreamConstraints {
|
||||
var video: Dynamic? /* = false */
|
||||
public external interface MediaStreamConstraints : JsAny {
|
||||
var video: JsAny? /* = false */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var audio: Dynamic? /* = false */
|
||||
var audio: JsAny? /* = false */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun MediaStreamConstraints(video: Dynamic? = false.unsafeCast<Dynamic?>(), audio: Dynamic? = false.unsafeCast<Dynamic?>()): MediaStreamConstraints {
|
||||
val o = newJsObject()
|
||||
o["video"] = video
|
||||
o["audio"] = audio
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as MediaStreamConstraints
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun MediaStreamConstraints(video: JsAny? = false.toJsBoolean(), audio: JsAny? = false.toJsBoolean()): MediaStreamConstraints { js("return { video, audio };") }
|
||||
|
||||
public external interface ConstrainablePattern {
|
||||
public external interface ConstrainablePattern : JsAny {
|
||||
var onoverconstrained: ((Event) -> Dynamic?)?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
fun getCapabilities(): Capabilities
|
||||
fun getConstraints(): Constraints
|
||||
fun getSettings(): Settings
|
||||
fun applyConstraints(constraints: Constraints = definedExternally): Promise<Unit>
|
||||
fun applyConstraints(constraints: Constraints = definedExternally): Promise<Nothing?>
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [DoubleRange](https://developer.mozilla.org/en/docs/Web/API/DoubleRange) to Kotlin
|
||||
*/
|
||||
public external interface DoubleRange {
|
||||
public external interface DoubleRange : JsAny {
|
||||
var max: Double?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -522,17 +391,10 @@ public external interface DoubleRange {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun DoubleRange(max: Double? = undefined, min: Double? = undefined): DoubleRange {
|
||||
val o = newJsObject()
|
||||
o["max"] = max
|
||||
o["min"] = min
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as DoubleRange
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun DoubleRange(max: Double? = undefined, min: Double? = undefined): DoubleRange { js("return { max, min };") }
|
||||
|
||||
public external interface ConstrainDoubleRange : DoubleRange {
|
||||
public external interface ConstrainDoubleRange : DoubleRange, JsAny {
|
||||
var exact: Double?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -541,19 +403,10 @@ public external interface ConstrainDoubleRange : DoubleRange {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ConstrainDoubleRange(exact: Double? = undefined, ideal: Double? = undefined, max: Double? = undefined, min: Double? = undefined): ConstrainDoubleRange {
|
||||
val o = newJsObject()
|
||||
o["exact"] = exact
|
||||
o["ideal"] = ideal
|
||||
o["max"] = max
|
||||
o["min"] = min
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ConstrainDoubleRange
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ConstrainDoubleRange(exact: Double? = undefined, ideal: Double? = undefined, max: Double? = undefined, min: Double? = undefined): ConstrainDoubleRange { js("return { exact, ideal, max, min };") }
|
||||
|
||||
public external interface ULongRange {
|
||||
public external interface ULongRange : JsAny {
|
||||
var max: Int?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -562,17 +415,10 @@ public external interface ULongRange {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ULongRange(max: Int? = undefined, min: Int? = undefined): ULongRange {
|
||||
val o = newJsObject()
|
||||
o["max"] = max
|
||||
o["min"] = min
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ULongRange
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ULongRange(max: Int? = undefined, min: Int? = undefined): ULongRange { js("return { max, min };") }
|
||||
|
||||
public external interface ConstrainULongRange : ULongRange {
|
||||
public external interface ConstrainULongRange : ULongRange, JsAny {
|
||||
var exact: Int?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -581,22 +427,13 @@ public external interface ConstrainULongRange : ULongRange {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ConstrainULongRange(exact: Int? = undefined, ideal: Int? = undefined, max: Int? = undefined, min: Int? = undefined): ConstrainULongRange {
|
||||
val o = newJsObject()
|
||||
o["exact"] = exact
|
||||
o["ideal"] = ideal
|
||||
o["max"] = max
|
||||
o["min"] = min
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ConstrainULongRange
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ConstrainULongRange(exact: Int? = undefined, ideal: Int? = undefined, max: Int? = undefined, min: Int? = undefined): ConstrainULongRange { js("return { exact, ideal, max, min };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ConstrainBooleanParameters](https://developer.mozilla.org/en/docs/Web/API/ConstrainBooleanParameters) to Kotlin
|
||||
*/
|
||||
public external interface ConstrainBooleanParameters {
|
||||
public external interface ConstrainBooleanParameters : JsAny {
|
||||
var exact: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -605,87 +442,52 @@ public external interface ConstrainBooleanParameters {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ConstrainBooleanParameters(exact: Boolean? = undefined, ideal: Boolean? = undefined): ConstrainBooleanParameters {
|
||||
val o = newJsObject()
|
||||
o["exact"] = exact
|
||||
o["ideal"] = ideal
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ConstrainBooleanParameters
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ConstrainBooleanParameters(exact: Boolean? = undefined, ideal: Boolean? = undefined): ConstrainBooleanParameters { js("return { exact, ideal };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ConstrainDOMStringParameters](https://developer.mozilla.org/en/docs/Web/API/ConstrainDOMStringParameters) to Kotlin
|
||||
*/
|
||||
public external interface ConstrainDOMStringParameters {
|
||||
var exact: Dynamic?
|
||||
public external interface ConstrainDOMStringParameters : JsAny {
|
||||
var exact: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var ideal: Dynamic?
|
||||
var ideal: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ConstrainDOMStringParameters(exact: Dynamic? = undefined, ideal: Dynamic? = undefined): ConstrainDOMStringParameters {
|
||||
val o = newJsObject()
|
||||
o["exact"] = exact
|
||||
o["ideal"] = ideal
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ConstrainDOMStringParameters
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ConstrainDOMStringParameters(exact: JsAny? = undefined, ideal: JsAny? = undefined): ConstrainDOMStringParameters { js("return { exact, ideal };") }
|
||||
|
||||
public external interface Capabilities
|
||||
public external interface Capabilities : JsAny
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun Capabilities(): Capabilities {
|
||||
val o = newJsObject()
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as Capabilities
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun Capabilities(): Capabilities { js("return { };") }
|
||||
|
||||
public external interface Settings
|
||||
public external interface Settings : JsAny
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun Settings(): Settings {
|
||||
val o = newJsObject()
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as Settings
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun Settings(): Settings { js("return { };") }
|
||||
|
||||
public external interface ConstraintSet
|
||||
public external interface ConstraintSet : JsAny
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ConstraintSet(): ConstraintSet {
|
||||
val o = newJsObject()
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ConstraintSet
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ConstraintSet(): ConstraintSet { js("return { };") }
|
||||
|
||||
public external interface Constraints : ConstraintSet {
|
||||
var advanced: Array<ConstraintSet>?
|
||||
public external interface Constraints : ConstraintSet, JsAny {
|
||||
var advanced: JsArray<ConstraintSet>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun Constraints(advanced: Array<ConstraintSet>? = undefined): Constraints {
|
||||
val o = newJsObject()
|
||||
o["advanced"] = advanced
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as Constraints
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun Constraints(advanced: JsArray<ConstraintSet>? = undefined): Constraints { js("return { advanced };") }
|
||||
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface MediaStreamTrackState {
|
||||
public external interface MediaStreamTrackState : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -696,7 +498,7 @@ public inline val MediaStreamTrackState.Companion.ENDED: MediaStreamTrackState g
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface VideoFacingModeEnum {
|
||||
public external interface VideoFacingModeEnum : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -711,7 +513,7 @@ public inline val VideoFacingModeEnum.Companion.RIGHT: VideoFacingModeEnum get()
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface VideoResizeModeEnum {
|
||||
public external interface VideoResizeModeEnum : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -722,7 +524,7 @@ public inline val VideoResizeModeEnum.Companion.CROP_AND_SCALE: VideoResizeModeE
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface MediaDeviceKind {
|
||||
public external interface MediaDeviceKind : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.w3c.dom.events.*
|
||||
/**
|
||||
* Exposes the JavaScript [MediaSource](https://developer.mozilla.org/en/docs/Web/API/MediaSource) to Kotlin
|
||||
*/
|
||||
public external open class MediaSource : EventTarget, MediaProvider {
|
||||
public external open class MediaSource : EventTarget, MediaProvider, JsAny {
|
||||
open val sourceBuffers: SourceBufferList
|
||||
open val activeSourceBuffers: SourceBufferList
|
||||
open val readyState: ReadyState
|
||||
@@ -38,7 +38,7 @@ public external open class MediaSource : EventTarget, MediaProvider {
|
||||
/**
|
||||
* Exposes the JavaScript [SourceBuffer](https://developer.mozilla.org/en/docs/Web/API/SourceBuffer) to Kotlin
|
||||
*/
|
||||
public external abstract class SourceBuffer : EventTarget {
|
||||
public external abstract class SourceBuffer : EventTarget, JsAny {
|
||||
open var mode: AppendMode
|
||||
open val updating: Boolean
|
||||
open val buffered: TimeRanges
|
||||
@@ -53,7 +53,7 @@ public external abstract class SourceBuffer : EventTarget {
|
||||
open var onupdateend: ((Event) -> Dynamic?)?
|
||||
open var onerror: ((Event) -> Dynamic?)?
|
||||
open var onabort: ((Event) -> Dynamic?)?
|
||||
fun appendBuffer(data: Dynamic?)
|
||||
fun appendBuffer(data: JsAny?)
|
||||
fun abort()
|
||||
fun remove(start: Double, end: Double)
|
||||
}
|
||||
@@ -61,20 +61,19 @@ public external abstract class SourceBuffer : EventTarget {
|
||||
/**
|
||||
* Exposes the JavaScript [SourceBufferList](https://developer.mozilla.org/en/docs/Web/API/SourceBufferList) to Kotlin
|
||||
*/
|
||||
public external abstract class SourceBufferList : EventTarget {
|
||||
public external abstract class SourceBufferList : EventTarget, JsAny {
|
||||
open val length: Int
|
||||
open var onaddsourcebuffer: ((Event) -> Dynamic?)?
|
||||
open var onremovesourcebuffer: ((Event) -> Dynamic?)?
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SourceBufferList.get(index: Int): SourceBuffer? = asDynamic().getAny(index)
|
||||
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface ReadyState {
|
||||
public external interface ReadyState : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -87,7 +86,7 @@ public inline val ReadyState.Companion.ENDED: ReadyState get() = "ended".asDynam
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface EndOfStreamError {
|
||||
public external interface EndOfStreamError : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -98,7 +97,7 @@ public inline val EndOfStreamError.Companion.DECODE: EndOfStreamError get() = "d
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface AppendMode {
|
||||
public external interface AppendMode : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@ import org.w3c.dom.*
|
||||
/**
|
||||
* Exposes the JavaScript [DOMParser](https://developer.mozilla.org/en/docs/Web/API/DOMParser) to Kotlin
|
||||
*/
|
||||
public external open class DOMParser {
|
||||
fun parseFromString(str: String, type: Dynamic?): Document
|
||||
public external open class DOMParser : JsAny {
|
||||
fun parseFromString(str: String, type: JsAny?): Document
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [XMLSerializer](https://developer.mozilla.org/en/docs/Web/API/XMLSerializer) to Kotlin
|
||||
*/
|
||||
public external open class XMLSerializer {
|
||||
public external open class XMLSerializer : JsAny {
|
||||
fun serializeToString(root: Node): String
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import org.khronos.webgl.*
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
|
||||
public external interface PointerEventInit : MouseEventInit {
|
||||
public external interface PointerEventInit : MouseEventInit, JsAny {
|
||||
var pointerId: Int? /* = 0 */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -46,55 +46,13 @@ public external interface PointerEventInit : MouseEventInit {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun PointerEventInit(pointerId: Int? = 0, width: Double? = 1.0, height: Double? = 1.0, pressure: Float? = 0f, tangentialPressure: Float? = 0f, tiltX: Int? = 0, tiltY: Int? = 0, twist: Int? = 0, pointerType: String? = "", isPrimary: Boolean? = false, screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): PointerEventInit {
|
||||
val o = newJsObject()
|
||||
o["pointerId"] = pointerId
|
||||
o["width"] = width
|
||||
o["height"] = height
|
||||
o["pressure"] = pressure
|
||||
o["tangentialPressure"] = tangentialPressure
|
||||
o["tiltX"] = tiltX
|
||||
o["tiltY"] = tiltY
|
||||
o["twist"] = twist
|
||||
o["pointerType"] = pointerType
|
||||
o["isPrimary"] = isPrimary
|
||||
o["screenX"] = screenX
|
||||
o["screenY"] = screenY
|
||||
o["clientX"] = clientX
|
||||
o["clientY"] = clientY
|
||||
o["button"] = button
|
||||
o["buttons"] = buttons
|
||||
o["relatedTarget"] = relatedTarget
|
||||
o["region"] = region
|
||||
o["ctrlKey"] = ctrlKey
|
||||
o["shiftKey"] = shiftKey
|
||||
o["altKey"] = altKey
|
||||
o["metaKey"] = metaKey
|
||||
o["modifierAltGraph"] = modifierAltGraph
|
||||
o["modifierCapsLock"] = modifierCapsLock
|
||||
o["modifierFn"] = modifierFn
|
||||
o["modifierFnLock"] = modifierFnLock
|
||||
o["modifierHyper"] = modifierHyper
|
||||
o["modifierNumLock"] = modifierNumLock
|
||||
o["modifierScrollLock"] = modifierScrollLock
|
||||
o["modifierSuper"] = modifierSuper
|
||||
o["modifierSymbol"] = modifierSymbol
|
||||
o["modifierSymbolLock"] = modifierSymbolLock
|
||||
o["view"] = view
|
||||
o["detail"] = detail
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as PointerEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun PointerEventInit(pointerId: Int? = 0, width: Double? = 1.0, height: Double? = 1.0, pressure: Float? = 0f, tangentialPressure: Float? = 0f, tiltX: Int? = 0, tiltY: Int? = 0, twist: Int? = 0, pointerType: String? = "", isPrimary: Boolean? = false, screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): PointerEventInit { js("return { pointerId, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, pointerType, isPrimary, screenX, screenY, clientX, clientY, button, buttons, relatedTarget, region, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [PointerEvent](https://developer.mozilla.org/en/docs/Web/API/PointerEvent) to Kotlin
|
||||
*/
|
||||
public external open class PointerEvent(type: String, eventInitDict: PointerEventInit = definedExternally) : MouseEvent {
|
||||
public external open class PointerEvent(type: String, eventInitDict: PointerEventInit = definedExternally) : MouseEvent, JsAny {
|
||||
open val pointerId: Int
|
||||
open val width: Double
|
||||
open val height: Double
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.w3c.dom.css.*
|
||||
/**
|
||||
* Exposes the JavaScript [SVGElement](https://developer.mozilla.org/en/docs/Web/API/SVGElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGElement : Element, ElementCSSInlineStyle, GlobalEventHandlers, SVGElementInstance {
|
||||
public external abstract class SVGElement : Element, ElementCSSInlineStyle, GlobalEventHandlers, SVGElementInstance, JsAny {
|
||||
open val dataset: DOMStringMap
|
||||
open val ownerSVGElement: SVGSVGElement?
|
||||
open val viewportElement: SVGElement?
|
||||
@@ -46,7 +46,7 @@ public external abstract class SVGElement : Element, ElementCSSInlineStyle, Glob
|
||||
}
|
||||
}
|
||||
|
||||
public external interface SVGBoundingBoxOptions {
|
||||
public external interface SVGBoundingBoxOptions : JsAny {
|
||||
var fill: Boolean? /* = true */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -61,22 +61,13 @@ public external interface SVGBoundingBoxOptions {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun SVGBoundingBoxOptions(fill: Boolean? = true, stroke: Boolean? = false, markers: Boolean? = false, clipped: Boolean? = false): SVGBoundingBoxOptions {
|
||||
val o = newJsObject()
|
||||
o["fill"] = fill
|
||||
o["stroke"] = stroke
|
||||
o["markers"] = markers
|
||||
o["clipped"] = clipped
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as SVGBoundingBoxOptions
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun SVGBoundingBoxOptions(fill: Boolean? = true, stroke: Boolean? = false, markers: Boolean? = false, clipped: Boolean? = false): SVGBoundingBoxOptions { js("return { fill, stroke, markers, clipped };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [SVGGraphicsElement](https://developer.mozilla.org/en/docs/Web/API/SVGGraphicsElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGGraphicsElement : SVGElement, SVGTests {
|
||||
public external abstract class SVGGraphicsElement : SVGElement, SVGTests, JsAny {
|
||||
open val transform: SVGAnimatedTransformList
|
||||
fun getBBox(options: SVGBoundingBoxOptions = definedExternally): DOMRect
|
||||
fun getCTM(): DOMMatrix?
|
||||
@@ -107,7 +98,7 @@ public external abstract class SVGGraphicsElement : SVGElement, SVGTests {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGGeometryElement](https://developer.mozilla.org/en/docs/Web/API/SVGGeometryElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGGeometryElement : SVGGraphicsElement {
|
||||
public external abstract class SVGGeometryElement : SVGGraphicsElement, JsAny {
|
||||
open val pathLength: SVGAnimatedNumber
|
||||
fun isPointInFill(point: DOMPoint): Boolean
|
||||
fun isPointInStroke(point: DOMPoint): Boolean
|
||||
@@ -139,14 +130,14 @@ public external abstract class SVGGeometryElement : SVGGraphicsElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGNumber](https://developer.mozilla.org/en/docs/Web/API/SVGNumber) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGNumber {
|
||||
public external abstract class SVGNumber : JsAny {
|
||||
open var value: Float
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [SVGLength](https://developer.mozilla.org/en/docs/Web/API/SVGLength) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGLength {
|
||||
public external abstract class SVGLength : JsAny {
|
||||
open val unitType: Short
|
||||
open var value: Float
|
||||
open var valueInSpecifiedUnits: Float
|
||||
@@ -172,7 +163,7 @@ public external abstract class SVGLength {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAngle](https://developer.mozilla.org/en/docs/Web/API/SVGAngle) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAngle {
|
||||
public external abstract class SVGAngle : JsAny {
|
||||
open val unitType: Short
|
||||
open var value: Float
|
||||
open var valueInSpecifiedUnits: Float
|
||||
@@ -189,30 +180,28 @@ public external abstract class SVGAngle {
|
||||
}
|
||||
}
|
||||
|
||||
public external abstract class SVGNameList {
|
||||
public external abstract class SVGNameList : JsAny {
|
||||
open val length: Int
|
||||
open val numberOfItems: Int
|
||||
fun clear()
|
||||
fun initialize(newItem: Dynamic?): Dynamic?
|
||||
fun insertItemBefore(newItem: Dynamic?, index: Int): Dynamic?
|
||||
fun replaceItem(newItem: Dynamic?, index: Int): Dynamic?
|
||||
fun removeItem(index: Int): Dynamic?
|
||||
fun appendItem(newItem: Dynamic?): Dynamic?
|
||||
fun getItem(index: Int): Dynamic?
|
||||
fun initialize(newItem: JsAny?): JsAny?
|
||||
fun insertItemBefore(newItem: JsAny?, index: Int): JsAny?
|
||||
fun replaceItem(newItem: JsAny?, index: Int): JsAny?
|
||||
fun removeItem(index: Int): JsAny?
|
||||
fun appendItem(newItem: JsAny?): JsAny?
|
||||
fun getItem(index: Int): JsAny?
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGNameList.get(index: Int): Dynamic? = asDynamic().getAny(index)
|
||||
public inline operator fun SVGNameList.get(index: Int): JsAny? = asDynamic().getAny(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGNameList.set(index: Int, newItem: Dynamic?) { asDynamic()[index] = newItem }
|
||||
public inline operator fun SVGNameList.set(index: Int, newItem: JsAny?) { asDynamic()[index] = newItem }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [SVGNumberList](https://developer.mozilla.org/en/docs/Web/API/SVGNumberList) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGNumberList {
|
||||
public external abstract class SVGNumberList : JsAny {
|
||||
open val length: Int
|
||||
open val numberOfItems: Int
|
||||
fun clear()
|
||||
@@ -224,18 +213,16 @@ public external abstract class SVGNumberList {
|
||||
fun getItem(index: Int): SVGNumber
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGNumberList.get(index: Int): SVGNumber? = asDynamic().getAny(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGNumberList.set(index: Int, newItem: SVGNumber) { asDynamic()[index] = newItem }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [SVGLengthList](https://developer.mozilla.org/en/docs/Web/API/SVGLengthList) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGLengthList {
|
||||
public external abstract class SVGLengthList : JsAny {
|
||||
open val length: Int
|
||||
open val numberOfItems: Int
|
||||
fun clear()
|
||||
@@ -247,18 +234,16 @@ public external abstract class SVGLengthList {
|
||||
fun getItem(index: Int): SVGLength
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGLengthList.get(index: Int): SVGLength? = asDynamic().getAny(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGLengthList.set(index: Int, newItem: SVGLength) { asDynamic()[index] = newItem }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedBoolean](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedBoolean) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedBoolean {
|
||||
public external abstract class SVGAnimatedBoolean : JsAny {
|
||||
open var baseVal: Boolean
|
||||
open val animVal: Boolean
|
||||
}
|
||||
@@ -266,7 +251,7 @@ public external abstract class SVGAnimatedBoolean {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedEnumeration](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedEnumeration) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedEnumeration {
|
||||
public external abstract class SVGAnimatedEnumeration : JsAny {
|
||||
open var baseVal: Short
|
||||
open val animVal: Short
|
||||
}
|
||||
@@ -274,7 +259,7 @@ public external abstract class SVGAnimatedEnumeration {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedInteger](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedInteger) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedInteger {
|
||||
public external abstract class SVGAnimatedInteger : JsAny {
|
||||
open var baseVal: Int
|
||||
open val animVal: Int
|
||||
}
|
||||
@@ -282,7 +267,7 @@ public external abstract class SVGAnimatedInteger {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedNumber](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedNumber) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedNumber {
|
||||
public external abstract class SVGAnimatedNumber : JsAny {
|
||||
open var baseVal: Float
|
||||
open val animVal: Float
|
||||
}
|
||||
@@ -290,7 +275,7 @@ public external abstract class SVGAnimatedNumber {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedLength](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedLength) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedLength {
|
||||
public external abstract class SVGAnimatedLength : JsAny {
|
||||
open val baseVal: SVGLength
|
||||
open val animVal: SVGLength
|
||||
}
|
||||
@@ -298,7 +283,7 @@ public external abstract class SVGAnimatedLength {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedAngle](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedAngle) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedAngle {
|
||||
public external abstract class SVGAnimatedAngle : JsAny {
|
||||
open val baseVal: SVGAngle
|
||||
open val animVal: SVGAngle
|
||||
}
|
||||
@@ -306,7 +291,7 @@ public external abstract class SVGAnimatedAngle {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedString](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedString) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedString {
|
||||
public external abstract class SVGAnimatedString : JsAny {
|
||||
open var baseVal: String
|
||||
open val animVal: String
|
||||
}
|
||||
@@ -314,7 +299,7 @@ public external abstract class SVGAnimatedString {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedRect](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedRect) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedRect {
|
||||
public external abstract class SVGAnimatedRect : JsAny {
|
||||
open val baseVal: DOMRect
|
||||
open val animVal: DOMRectReadOnly
|
||||
}
|
||||
@@ -322,7 +307,7 @@ public external abstract class SVGAnimatedRect {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedNumberList](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedNumberList) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedNumberList {
|
||||
public external abstract class SVGAnimatedNumberList : JsAny {
|
||||
open val baseVal: SVGNumberList
|
||||
open val animVal: SVGNumberList
|
||||
}
|
||||
@@ -330,7 +315,7 @@ public external abstract class SVGAnimatedNumberList {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedLengthList](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedLengthList) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedLengthList {
|
||||
public external abstract class SVGAnimatedLengthList : JsAny {
|
||||
open val baseVal: SVGLengthList
|
||||
open val animVal: SVGLengthList
|
||||
}
|
||||
@@ -338,7 +323,7 @@ public external abstract class SVGAnimatedLengthList {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGStringList](https://developer.mozilla.org/en/docs/Web/API/SVGStringList) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGStringList {
|
||||
public external abstract class SVGStringList : JsAny {
|
||||
open val length: Int
|
||||
open val numberOfItems: Int
|
||||
fun clear()
|
||||
@@ -350,11 +335,9 @@ public external abstract class SVGStringList {
|
||||
fun getItem(index: Int): String
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGStringList.get(index: Int): String? = asDynamic().getString(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGStringList.set(index: Int, newItem: String) { asDynamic()[index] = newItem }
|
||||
|
||||
@@ -362,7 +345,7 @@ public inline operator fun SVGStringList.set(index: Int, newItem: String) { asDy
|
||||
* Exposes the JavaScript [SVGUnitTypes](https://developer.mozilla.org/en/docs/Web/API/SVGUnitTypes) to Kotlin
|
||||
*/
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface SVGUnitTypes {
|
||||
public external interface SVGUnitTypes : JsAny {
|
||||
companion object {
|
||||
val SVG_UNIT_TYPE_UNKNOWN: Short
|
||||
val SVG_UNIT_TYPE_USERSPACEONUSE: Short
|
||||
@@ -373,12 +356,12 @@ public external interface SVGUnitTypes {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGTests](https://developer.mozilla.org/en/docs/Web/API/SVGTests) to Kotlin
|
||||
*/
|
||||
public external interface SVGTests {
|
||||
public external interface SVGTests : JsAny {
|
||||
val requiredExtensions: SVGStringList
|
||||
val systemLanguage: SVGStringList
|
||||
}
|
||||
|
||||
public external interface SVGFitToViewBox {
|
||||
public external interface SVGFitToViewBox : JsAny {
|
||||
val viewBox: SVGAnimatedRect
|
||||
val preserveAspectRatio: SVGAnimatedPreserveAspectRatio
|
||||
}
|
||||
@@ -387,7 +370,7 @@ public external interface SVGFitToViewBox {
|
||||
* Exposes the JavaScript [SVGZoomAndPan](https://developer.mozilla.org/en/docs/Web/API/SVGZoomAndPan) to Kotlin
|
||||
*/
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface SVGZoomAndPan {
|
||||
public external interface SVGZoomAndPan : JsAny {
|
||||
var zoomAndPan: Short
|
||||
|
||||
companion object {
|
||||
@@ -400,14 +383,14 @@ public external interface SVGZoomAndPan {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGURIReference](https://developer.mozilla.org/en/docs/Web/API/SVGURIReference) to Kotlin
|
||||
*/
|
||||
public external interface SVGURIReference {
|
||||
public external interface SVGURIReference : JsAny {
|
||||
val href: SVGAnimatedString
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [SVGSVGElement](https://developer.mozilla.org/en/docs/Web/API/SVGSVGElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGSVGElement : SVGGraphicsElement, SVGFitToViewBox, SVGZoomAndPan, WindowEventHandlers {
|
||||
public external abstract class SVGSVGElement : SVGGraphicsElement, SVGFitToViewBox, SVGZoomAndPan, WindowEventHandlers, JsAny {
|
||||
open val x: SVGAnimatedLength
|
||||
open val y: SVGAnimatedLength
|
||||
open val width: SVGAnimatedLength
|
||||
@@ -461,7 +444,7 @@ public external abstract class SVGSVGElement : SVGGraphicsElement, SVGFitToViewB
|
||||
/**
|
||||
* Exposes the JavaScript [SVGGElement](https://developer.mozilla.org/en/docs/Web/API/SVGGElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGGElement : SVGGraphicsElement {
|
||||
public external abstract class SVGGElement : SVGGraphicsElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -484,7 +467,7 @@ public external abstract class SVGGElement : SVGGraphicsElement {
|
||||
}
|
||||
}
|
||||
|
||||
public external abstract class SVGUnknownElement : SVGGraphicsElement {
|
||||
public external abstract class SVGUnknownElement : SVGGraphicsElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -510,7 +493,7 @@ public external abstract class SVGUnknownElement : SVGGraphicsElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGDefsElement](https://developer.mozilla.org/en/docs/Web/API/SVGDefsElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGDefsElement : SVGGraphicsElement {
|
||||
public external abstract class SVGDefsElement : SVGGraphicsElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -536,7 +519,7 @@ public external abstract class SVGDefsElement : SVGGraphicsElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGDescElement](https://developer.mozilla.org/en/docs/Web/API/SVGDescElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGDescElement : SVGElement {
|
||||
public external abstract class SVGDescElement : SVGElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -562,7 +545,7 @@ public external abstract class SVGDescElement : SVGElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGMetadataElement](https://developer.mozilla.org/en/docs/Web/API/SVGMetadataElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGMetadataElement : SVGElement {
|
||||
public external abstract class SVGMetadataElement : SVGElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -588,7 +571,7 @@ public external abstract class SVGMetadataElement : SVGElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGTitleElement](https://developer.mozilla.org/en/docs/Web/API/SVGTitleElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGTitleElement : SVGElement {
|
||||
public external abstract class SVGTitleElement : SVGElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -614,7 +597,7 @@ public external abstract class SVGTitleElement : SVGElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGSymbolElement](https://developer.mozilla.org/en/docs/Web/API/SVGSymbolElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGSymbolElement : SVGGraphicsElement, SVGFitToViewBox {
|
||||
public external abstract class SVGSymbolElement : SVGGraphicsElement, SVGFitToViewBox, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -640,7 +623,7 @@ public external abstract class SVGSymbolElement : SVGGraphicsElement, SVGFitToVi
|
||||
/**
|
||||
* Exposes the JavaScript [SVGUseElement](https://developer.mozilla.org/en/docs/Web/API/SVGUseElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGUseElement : SVGGraphicsElement, SVGURIReference {
|
||||
public external abstract class SVGUseElement : SVGGraphicsElement, SVGURIReference, JsAny {
|
||||
open val x: SVGAnimatedLength
|
||||
open val y: SVGAnimatedLength
|
||||
open val width: SVGAnimatedLength
|
||||
@@ -670,7 +653,7 @@ public external abstract class SVGUseElement : SVGGraphicsElement, SVGURIReferen
|
||||
}
|
||||
}
|
||||
|
||||
public external open class SVGUseElementShadowRoot : ShadowRoot {
|
||||
public external open class SVGUseElementShadowRoot : ShadowRoot, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -693,21 +676,21 @@ public external open class SVGUseElementShadowRoot : ShadowRoot {
|
||||
}
|
||||
}
|
||||
|
||||
public external interface SVGElementInstance {
|
||||
public external interface SVGElementInstance : JsAny {
|
||||
val correspondingElement: SVGElement?
|
||||
get() = definedExternally
|
||||
val correspondingUseElement: SVGUseElement?
|
||||
get() = definedExternally
|
||||
}
|
||||
|
||||
public external open class ShadowAnimation(source: Dynamic?, newTarget: Dynamic?) {
|
||||
open val sourceAnimation: Dynamic?
|
||||
public external open class ShadowAnimation(source: JsAny?, newTarget: JsAny?) : JsAny {
|
||||
open val sourceAnimation: JsAny?
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [SVGSwitchElement](https://developer.mozilla.org/en/docs/Web/API/SVGSwitchElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGSwitchElement : SVGGraphicsElement {
|
||||
public external abstract class SVGSwitchElement : SVGGraphicsElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -730,14 +713,14 @@ public external abstract class SVGSwitchElement : SVGGraphicsElement {
|
||||
}
|
||||
}
|
||||
|
||||
public external interface GetSVGDocument {
|
||||
public external interface GetSVGDocument : JsAny {
|
||||
fun getSVGDocument(): Document
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [SVGStyleElement](https://developer.mozilla.org/en/docs/Web/API/SVGStyleElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGStyleElement : SVGElement, LinkStyle {
|
||||
public external abstract class SVGStyleElement : SVGElement, LinkStyle, JsAny {
|
||||
open var type: String
|
||||
open var media: String
|
||||
open var title: String
|
||||
@@ -767,7 +750,7 @@ public external abstract class SVGStyleElement : SVGElement, LinkStyle {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGTransform](https://developer.mozilla.org/en/docs/Web/API/SVGTransform) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGTransform {
|
||||
public external abstract class SVGTransform : JsAny {
|
||||
open val type: Short
|
||||
open val matrix: DOMMatrix
|
||||
open val angle: Float
|
||||
@@ -792,7 +775,7 @@ public external abstract class SVGTransform {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGTransformList](https://developer.mozilla.org/en/docs/Web/API/SVGTransformList) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGTransformList {
|
||||
public external abstract class SVGTransformList : JsAny {
|
||||
open val length: Int
|
||||
open val numberOfItems: Int
|
||||
fun clear()
|
||||
@@ -806,18 +789,16 @@ public external abstract class SVGTransformList {
|
||||
fun getItem(index: Int): SVGTransform
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGTransformList.get(index: Int): SVGTransform? = asDynamic().getAny(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGTransformList.set(index: Int, newItem: SVGTransform) { asDynamic()[index] = newItem }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedTransformList](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedTransformList) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedTransformList {
|
||||
public external abstract class SVGAnimatedTransformList : JsAny {
|
||||
open val baseVal: SVGTransformList
|
||||
open val animVal: SVGTransformList
|
||||
}
|
||||
@@ -825,7 +806,7 @@ public external abstract class SVGAnimatedTransformList {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGPreserveAspectRatio](https://developer.mozilla.org/en/docs/Web/API/SVGPreserveAspectRatio) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGPreserveAspectRatio {
|
||||
public external abstract class SVGPreserveAspectRatio : JsAny {
|
||||
open var align: Short
|
||||
open var meetOrSlice: Short
|
||||
|
||||
@@ -850,7 +831,7 @@ public external abstract class SVGPreserveAspectRatio {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedPreserveAspectRatio](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedPreserveAspectRatio) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAnimatedPreserveAspectRatio {
|
||||
public external abstract class SVGAnimatedPreserveAspectRatio : JsAny {
|
||||
open val baseVal: SVGPreserveAspectRatio
|
||||
open val animVal: SVGPreserveAspectRatio
|
||||
}
|
||||
@@ -858,7 +839,7 @@ public external abstract class SVGAnimatedPreserveAspectRatio {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGPathElement](https://developer.mozilla.org/en/docs/Web/API/SVGPathElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGPathElement : SVGGeometryElement {
|
||||
public external abstract class SVGPathElement : SVGGeometryElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -884,7 +865,7 @@ public external abstract class SVGPathElement : SVGGeometryElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGRectElement](https://developer.mozilla.org/en/docs/Web/API/SVGRectElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGRectElement : SVGGeometryElement {
|
||||
public external abstract class SVGRectElement : SVGGeometryElement, JsAny {
|
||||
open val x: SVGAnimatedLength
|
||||
open val y: SVGAnimatedLength
|
||||
open val width: SVGAnimatedLength
|
||||
@@ -917,7 +898,7 @@ public external abstract class SVGRectElement : SVGGeometryElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGCircleElement](https://developer.mozilla.org/en/docs/Web/API/SVGCircleElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGCircleElement : SVGGeometryElement {
|
||||
public external abstract class SVGCircleElement : SVGGeometryElement, JsAny {
|
||||
open val cx: SVGAnimatedLength
|
||||
open val cy: SVGAnimatedLength
|
||||
open val r: SVGAnimatedLength
|
||||
@@ -947,7 +928,7 @@ public external abstract class SVGCircleElement : SVGGeometryElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGEllipseElement](https://developer.mozilla.org/en/docs/Web/API/SVGEllipseElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGEllipseElement : SVGGeometryElement {
|
||||
public external abstract class SVGEllipseElement : SVGGeometryElement, JsAny {
|
||||
open val cx: SVGAnimatedLength
|
||||
open val cy: SVGAnimatedLength
|
||||
open val rx: SVGAnimatedLength
|
||||
@@ -978,7 +959,7 @@ public external abstract class SVGEllipseElement : SVGGeometryElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGLineElement](https://developer.mozilla.org/en/docs/Web/API/SVGLineElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGLineElement : SVGGeometryElement {
|
||||
public external abstract class SVGLineElement : SVGGeometryElement, JsAny {
|
||||
open val x1: SVGAnimatedLength
|
||||
open val y1: SVGAnimatedLength
|
||||
open val x2: SVGAnimatedLength
|
||||
@@ -1009,7 +990,7 @@ public external abstract class SVGLineElement : SVGGeometryElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGMeshElement](https://developer.mozilla.org/en/docs/Web/API/SVGMeshElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGMeshElement : SVGGeometryElement, SVGURIReference {
|
||||
public external abstract class SVGMeshElement : SVGGeometryElement, SVGURIReference, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -1035,12 +1016,12 @@ public external abstract class SVGMeshElement : SVGGeometryElement, SVGURIRefere
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAnimatedPoints](https://developer.mozilla.org/en/docs/Web/API/SVGAnimatedPoints) to Kotlin
|
||||
*/
|
||||
public external interface SVGAnimatedPoints {
|
||||
public external interface SVGAnimatedPoints : JsAny {
|
||||
val points: SVGPointList
|
||||
val animatedPoints: SVGPointList
|
||||
}
|
||||
|
||||
public external abstract class SVGPointList {
|
||||
public external abstract class SVGPointList : JsAny {
|
||||
open val length: Int
|
||||
open val numberOfItems: Int
|
||||
fun clear()
|
||||
@@ -1052,18 +1033,16 @@ public external abstract class SVGPointList {
|
||||
fun getItem(index: Int): DOMPoint
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGPointList.get(index: Int): DOMPoint? = asDynamic().getAny(index)
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun SVGPointList.set(index: Int, newItem: DOMPoint) { asDynamic()[index] = newItem }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [SVGPolylineElement](https://developer.mozilla.org/en/docs/Web/API/SVGPolylineElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGPolylineElement : SVGGeometryElement, SVGAnimatedPoints {
|
||||
public external abstract class SVGPolylineElement : SVGGeometryElement, SVGAnimatedPoints, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -1089,7 +1068,7 @@ public external abstract class SVGPolylineElement : SVGGeometryElement, SVGAnima
|
||||
/**
|
||||
* Exposes the JavaScript [SVGPolygonElement](https://developer.mozilla.org/en/docs/Web/API/SVGPolygonElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGPolygonElement : SVGGeometryElement, SVGAnimatedPoints {
|
||||
public external abstract class SVGPolygonElement : SVGGeometryElement, SVGAnimatedPoints, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -1115,7 +1094,7 @@ public external abstract class SVGPolygonElement : SVGGeometryElement, SVGAnimat
|
||||
/**
|
||||
* Exposes the JavaScript [SVGTextContentElement](https://developer.mozilla.org/en/docs/Web/API/SVGTextContentElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGTextContentElement : SVGGraphicsElement {
|
||||
public external abstract class SVGTextContentElement : SVGGraphicsElement, JsAny {
|
||||
open val textLength: SVGAnimatedLength
|
||||
open val lengthAdjust: SVGAnimatedEnumeration
|
||||
fun getNumberOfChars(): Int
|
||||
@@ -1156,7 +1135,7 @@ public external abstract class SVGTextContentElement : SVGGraphicsElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGTextPositioningElement](https://developer.mozilla.org/en/docs/Web/API/SVGTextPositioningElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGTextPositioningElement : SVGTextContentElement {
|
||||
public external abstract class SVGTextPositioningElement : SVGTextContentElement, JsAny {
|
||||
open val x: SVGAnimatedLengthList
|
||||
open val y: SVGAnimatedLengthList
|
||||
open val dx: SVGAnimatedLengthList
|
||||
@@ -1191,7 +1170,7 @@ public external abstract class SVGTextPositioningElement : SVGTextContentElement
|
||||
/**
|
||||
* Exposes the JavaScript [SVGTextElement](https://developer.mozilla.org/en/docs/Web/API/SVGTextElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGTextElement : SVGTextPositioningElement {
|
||||
public external abstract class SVGTextElement : SVGTextPositioningElement, JsAny {
|
||||
companion object {
|
||||
val LENGTHADJUST_UNKNOWN: Short
|
||||
val LENGTHADJUST_SPACING: Short
|
||||
@@ -1220,7 +1199,7 @@ public external abstract class SVGTextElement : SVGTextPositioningElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGTSpanElement](https://developer.mozilla.org/en/docs/Web/API/SVGTSpanElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGTSpanElement : SVGTextPositioningElement {
|
||||
public external abstract class SVGTSpanElement : SVGTextPositioningElement, JsAny {
|
||||
companion object {
|
||||
val LENGTHADJUST_UNKNOWN: Short
|
||||
val LENGTHADJUST_SPACING: Short
|
||||
@@ -1249,7 +1228,7 @@ public external abstract class SVGTSpanElement : SVGTextPositioningElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGTextPathElement](https://developer.mozilla.org/en/docs/Web/API/SVGTextPathElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGTextPathElement : SVGTextContentElement, SVGURIReference {
|
||||
public external abstract class SVGTextPathElement : SVGTextContentElement, SVGURIReference, JsAny {
|
||||
open val startOffset: SVGAnimatedLength
|
||||
open val method: SVGAnimatedEnumeration
|
||||
open val spacing: SVGAnimatedEnumeration
|
||||
@@ -1288,7 +1267,7 @@ public external abstract class SVGTextPathElement : SVGTextContentElement, SVGUR
|
||||
/**
|
||||
* Exposes the JavaScript [SVGImageElement](https://developer.mozilla.org/en/docs/Web/API/SVGImageElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGImageElement : SVGGraphicsElement, SVGURIReference, HTMLOrSVGImageElement {
|
||||
public external abstract class SVGImageElement : SVGGraphicsElement, SVGURIReference, HTMLOrSVGImageElement, JsAny {
|
||||
open val x: SVGAnimatedLength
|
||||
open val y: SVGAnimatedLength
|
||||
open val width: SVGAnimatedLength
|
||||
@@ -1321,7 +1300,7 @@ public external abstract class SVGImageElement : SVGGraphicsElement, SVGURIRefer
|
||||
/**
|
||||
* Exposes the JavaScript [SVGForeignObjectElement](https://developer.mozilla.org/en/docs/Web/API/SVGForeignObjectElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGForeignObjectElement : SVGGraphicsElement {
|
||||
public external abstract class SVGForeignObjectElement : SVGGraphicsElement, JsAny {
|
||||
open val x: SVGAnimatedLength
|
||||
open val y: SVGAnimatedLength
|
||||
open val width: SVGAnimatedLength
|
||||
@@ -1349,7 +1328,7 @@ public external abstract class SVGForeignObjectElement : SVGGraphicsElement {
|
||||
}
|
||||
}
|
||||
|
||||
public external abstract class SVGMarkerElement : SVGElement, SVGFitToViewBox {
|
||||
public external abstract class SVGMarkerElement : SVGElement, SVGFitToViewBox, JsAny {
|
||||
open val refX: SVGAnimatedLength
|
||||
open val refY: SVGAnimatedLength
|
||||
open val markerUnits: SVGAnimatedEnumeration
|
||||
@@ -1392,7 +1371,7 @@ public external abstract class SVGMarkerElement : SVGElement, SVGFitToViewBox {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGSolidcolorElement](https://developer.mozilla.org/en/docs/Web/API/SVGSolidcolorElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGSolidcolorElement : SVGElement {
|
||||
public external abstract class SVGSolidcolorElement : SVGElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -1418,7 +1397,7 @@ public external abstract class SVGSolidcolorElement : SVGElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGGradientElement](https://developer.mozilla.org/en/docs/Web/API/SVGGradientElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGGradientElement : SVGElement, SVGURIReference, SVGUnitTypes {
|
||||
public external abstract class SVGGradientElement : SVGElement, SVGURIReference, SVGUnitTypes, JsAny {
|
||||
open val gradientUnits: SVGAnimatedEnumeration
|
||||
open val gradientTransform: SVGAnimatedTransformList
|
||||
open val spreadMethod: SVGAnimatedEnumeration
|
||||
@@ -1455,7 +1434,7 @@ public external abstract class SVGGradientElement : SVGElement, SVGURIReference,
|
||||
/**
|
||||
* Exposes the JavaScript [SVGLinearGradientElement](https://developer.mozilla.org/en/docs/Web/API/SVGLinearGradientElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGLinearGradientElement : SVGGradientElement {
|
||||
public external abstract class SVGLinearGradientElement : SVGGradientElement, JsAny {
|
||||
open val x1: SVGAnimatedLength
|
||||
open val y1: SVGAnimatedLength
|
||||
open val x2: SVGAnimatedLength
|
||||
@@ -1493,7 +1472,7 @@ public external abstract class SVGLinearGradientElement : SVGGradientElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGRadialGradientElement](https://developer.mozilla.org/en/docs/Web/API/SVGRadialGradientElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGRadialGradientElement : SVGGradientElement {
|
||||
public external abstract class SVGRadialGradientElement : SVGGradientElement, JsAny {
|
||||
open val cx: SVGAnimatedLength
|
||||
open val cy: SVGAnimatedLength
|
||||
open val r: SVGAnimatedLength
|
||||
@@ -1530,7 +1509,7 @@ public external abstract class SVGRadialGradientElement : SVGGradientElement {
|
||||
}
|
||||
}
|
||||
|
||||
public external abstract class SVGMeshGradientElement : SVGGradientElement {
|
||||
public external abstract class SVGMeshGradientElement : SVGGradientElement, JsAny {
|
||||
companion object {
|
||||
val SVG_SPREADMETHOD_UNKNOWN: Short
|
||||
val SVG_SPREADMETHOD_PAD: Short
|
||||
@@ -1560,7 +1539,7 @@ public external abstract class SVGMeshGradientElement : SVGGradientElement {
|
||||
}
|
||||
}
|
||||
|
||||
public external abstract class SVGMeshrowElement : SVGElement {
|
||||
public external abstract class SVGMeshrowElement : SVGElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -1583,7 +1562,7 @@ public external abstract class SVGMeshrowElement : SVGElement {
|
||||
}
|
||||
}
|
||||
|
||||
public external abstract class SVGMeshpatchElement : SVGElement {
|
||||
public external abstract class SVGMeshpatchElement : SVGElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -1609,7 +1588,7 @@ public external abstract class SVGMeshpatchElement : SVGElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGStopElement](https://developer.mozilla.org/en/docs/Web/API/SVGStopElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGStopElement : SVGElement {
|
||||
public external abstract class SVGStopElement : SVGElement, JsAny {
|
||||
open val offset: SVGAnimatedNumber
|
||||
|
||||
companion object {
|
||||
@@ -1637,7 +1616,7 @@ public external abstract class SVGStopElement : SVGElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGPatternElement](https://developer.mozilla.org/en/docs/Web/API/SVGPatternElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGPatternElement : SVGElement, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {
|
||||
public external abstract class SVGPatternElement : SVGElement, SVGFitToViewBox, SVGURIReference, SVGUnitTypes, JsAny {
|
||||
open val patternUnits: SVGAnimatedEnumeration
|
||||
open val patternContentUnits: SVGAnimatedEnumeration
|
||||
open val patternTransform: SVGAnimatedTransformList
|
||||
@@ -1671,7 +1650,7 @@ public external abstract class SVGPatternElement : SVGElement, SVGFitToViewBox,
|
||||
}
|
||||
}
|
||||
|
||||
public external abstract class SVGHatchElement : SVGElement {
|
||||
public external abstract class SVGHatchElement : SVGElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -1694,7 +1673,7 @@ public external abstract class SVGHatchElement : SVGElement {
|
||||
}
|
||||
}
|
||||
|
||||
public external abstract class SVGHatchpathElement : SVGElement {
|
||||
public external abstract class SVGHatchpathElement : SVGElement, JsAny {
|
||||
companion object {
|
||||
val ELEMENT_NODE: Short
|
||||
val ATTRIBUTE_NODE: Short
|
||||
@@ -1720,7 +1699,7 @@ public external abstract class SVGHatchpathElement : SVGElement {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGCursorElement](https://developer.mozilla.org/en/docs/Web/API/SVGCursorElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGCursorElement : SVGElement, SVGURIReference {
|
||||
public external abstract class SVGCursorElement : SVGElement, SVGURIReference, JsAny {
|
||||
open val x: SVGAnimatedLength
|
||||
open val y: SVGAnimatedLength
|
||||
|
||||
@@ -1749,7 +1728,7 @@ public external abstract class SVGCursorElement : SVGElement, SVGURIReference {
|
||||
/**
|
||||
* Exposes the JavaScript [SVGScriptElement](https://developer.mozilla.org/en/docs/Web/API/SVGScriptElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGScriptElement : SVGElement, SVGURIReference, HTMLOrSVGScriptElement {
|
||||
public external abstract class SVGScriptElement : SVGElement, SVGURIReference, HTMLOrSVGScriptElement, JsAny {
|
||||
open var type: String
|
||||
open var crossOrigin: String?
|
||||
|
||||
@@ -1778,7 +1757,7 @@ public external abstract class SVGScriptElement : SVGElement, SVGURIReference, H
|
||||
/**
|
||||
* Exposes the JavaScript [SVGAElement](https://developer.mozilla.org/en/docs/Web/API/SVGAElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGAElement : SVGGraphicsElement, SVGURIReference {
|
||||
public external abstract class SVGAElement : SVGGraphicsElement, SVGURIReference, JsAny {
|
||||
open val target: SVGAnimatedString
|
||||
open val download: SVGAnimatedString
|
||||
open val rel: SVGAnimatedString
|
||||
@@ -1811,7 +1790,7 @@ public external abstract class SVGAElement : SVGGraphicsElement, SVGURIReference
|
||||
/**
|
||||
* Exposes the JavaScript [SVGViewElement](https://developer.mozilla.org/en/docs/Web/API/SVGViewElement) to Kotlin
|
||||
*/
|
||||
public external abstract class SVGViewElement : SVGElement, SVGFitToViewBox, SVGZoomAndPan {
|
||||
public external abstract class SVGViewElement : SVGElement, SVGFitToViewBox, SVGZoomAndPan, JsAny {
|
||||
companion object {
|
||||
val SVG_ZOOMANDPAN_UNKNOWN: Short
|
||||
val SVG_ZOOMANDPAN_DISABLE: Short
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.w3c.files.*
|
||||
/**
|
||||
* Exposes the JavaScript [URL](https://developer.mozilla.org/en/docs/Web/API/URL) to Kotlin
|
||||
*/
|
||||
public external open class URL(url: String, base: String = definedExternally) {
|
||||
public external open class URL(url: String, base: String = definedExternally) : JsAny {
|
||||
var href: String
|
||||
open val origin: String
|
||||
var protocol: String
|
||||
@@ -43,11 +43,11 @@ public external open class URL(url: String, base: String = definedExternally) {
|
||||
/**
|
||||
* Exposes the JavaScript [URLSearchParams](https://developer.mozilla.org/en/docs/Web/API/URLSearchParams) to Kotlin
|
||||
*/
|
||||
public external open class URLSearchParams(init: Dynamic? = definedExternally) {
|
||||
public external open class URLSearchParams(init: JsAny? = definedExternally) : JsAny {
|
||||
fun append(name: String, value: String)
|
||||
fun delete(name: String)
|
||||
fun get(name: String): String?
|
||||
fun getAll(name: String): Array<String>
|
||||
fun getAll(name: String): JsArray<JsString>
|
||||
fun has(name: String): Boolean
|
||||
fun set(name: String, value: String)
|
||||
}
|
||||
@@ -16,7 +16,7 @@ import org.w3c.xhr.*
|
||||
/**
|
||||
* Exposes the JavaScript [Headers](https://developer.mozilla.org/en/docs/Web/API/Headers) to Kotlin
|
||||
*/
|
||||
public external open class Headers(init: Dynamic? = definedExternally) {
|
||||
public external open class Headers(init: JsAny? = definedExternally) : JsAny {
|
||||
fun append(name: String, value: String)
|
||||
fun delete(name: String)
|
||||
fun get(name: String): String?
|
||||
@@ -27,26 +27,26 @@ public external open class Headers(init: Dynamic? = definedExternally) {
|
||||
/**
|
||||
* Exposes the JavaScript [Body](https://developer.mozilla.org/en/docs/Web/API/Body) to Kotlin
|
||||
*/
|
||||
public external interface Body {
|
||||
public external interface Body : JsAny {
|
||||
val bodyUsed: Boolean
|
||||
fun arrayBuffer(): Promise<ArrayBuffer>
|
||||
fun blob(): Promise<Blob>
|
||||
fun formData(): Promise<FormData>
|
||||
fun json(): Promise<Any?>
|
||||
fun text(): Promise<String>
|
||||
fun json(): Promise<JsAny?>
|
||||
fun text(): Promise<JsString>
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Request](https://developer.mozilla.org/en/docs/Web/API/Request) to Kotlin
|
||||
*/
|
||||
public external open class Request(input: Dynamic?, init: RequestInit = definedExternally) : Body {
|
||||
public external open class Request(input: JsAny?, init: RequestInit = definedExternally) : Body, JsAny {
|
||||
open val method: String
|
||||
open val url: String
|
||||
open val headers: Headers
|
||||
open val type: RequestType
|
||||
open val destination: RequestDestination
|
||||
open val referrer: String
|
||||
open val referrerPolicy: Dynamic?
|
||||
open val referrerPolicy: JsAny?
|
||||
open val mode: RequestMode
|
||||
open val credentials: RequestCredentials
|
||||
open val cache: RequestCache
|
||||
@@ -58,24 +58,24 @@ public external open class Request(input: Dynamic?, init: RequestInit = definedE
|
||||
override fun arrayBuffer(): Promise<ArrayBuffer>
|
||||
override fun blob(): Promise<Blob>
|
||||
override fun formData(): Promise<FormData>
|
||||
override fun json(): Promise<Any?>
|
||||
override fun text(): Promise<String>
|
||||
override fun json(): Promise<JsAny?>
|
||||
override fun text(): Promise<JsString>
|
||||
}
|
||||
|
||||
public external interface RequestInit {
|
||||
public external interface RequestInit : JsAny {
|
||||
var method: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var headers: Dynamic?
|
||||
var headers: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var body: Dynamic?
|
||||
var body: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var referrer: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var referrerPolicy: Dynamic?
|
||||
var referrerPolicy: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var mode: RequestMode?
|
||||
@@ -96,35 +96,18 @@ public external interface RequestInit {
|
||||
var keepalive: Boolean?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var window: Any?
|
||||
var window: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun RequestInit(method: String? = undefined, headers: Dynamic? = undefined, body: Dynamic? = undefined, referrer: String? = undefined, referrerPolicy: Dynamic? = undefined, mode: RequestMode? = undefined, credentials: RequestCredentials? = undefined, cache: RequestCache? = undefined, redirect: RequestRedirect? = undefined, integrity: String? = undefined, keepalive: Boolean? = undefined, window: Any? = undefined): RequestInit {
|
||||
val o = newJsObject()
|
||||
o["method"] = method
|
||||
o["headers"] = headers
|
||||
o["body"] = body
|
||||
o["referrer"] = referrer
|
||||
o["referrerPolicy"] = referrerPolicy
|
||||
o["mode"] = mode
|
||||
o["credentials"] = credentials
|
||||
o["cache"] = cache
|
||||
o["redirect"] = redirect
|
||||
o["integrity"] = integrity
|
||||
o["keepalive"] = keepalive
|
||||
o["window"] = window
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as RequestInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun RequestInit(method: String? = undefined, headers: JsAny? = undefined, body: JsAny? = undefined, referrer: String? = undefined, referrerPolicy: JsAny? = undefined, mode: RequestMode? = undefined, credentials: RequestCredentials? = undefined, cache: RequestCache? = undefined, redirect: RequestRedirect? = undefined, integrity: String? = undefined, keepalive: Boolean? = undefined, window: JsAny? = undefined): RequestInit { js("return { method, headers, body, referrer, referrerPolicy, mode, credentials, cache, redirect, integrity, keepalive, window };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Response](https://developer.mozilla.org/en/docs/Web/API/Response) to Kotlin
|
||||
*/
|
||||
public external open class Response(body: Dynamic? = definedExternally, init: ResponseInit = definedExternally) : Body {
|
||||
public external open class Response(body: JsAny? = definedExternally, init: ResponseInit = definedExternally) : Body, JsAny {
|
||||
open val type: ResponseType
|
||||
open val url: String
|
||||
open val redirected: Boolean
|
||||
@@ -132,15 +115,15 @@ public external open class Response(body: Dynamic? = definedExternally, init: Re
|
||||
open val ok: Boolean
|
||||
open val statusText: String
|
||||
open val headers: Headers
|
||||
open val body: Dynamic?
|
||||
open val body: JsAny?
|
||||
open val trailer: Promise<Headers>
|
||||
override val bodyUsed: Boolean
|
||||
fun clone(): Response
|
||||
override fun arrayBuffer(): Promise<ArrayBuffer>
|
||||
override fun blob(): Promise<Blob>
|
||||
override fun formData(): Promise<FormData>
|
||||
override fun json(): Promise<Any?>
|
||||
override fun text(): Promise<String>
|
||||
override fun json(): Promise<JsAny?>
|
||||
override fun text(): Promise<JsString>
|
||||
|
||||
companion object {
|
||||
fun error(): Response
|
||||
@@ -148,33 +131,25 @@ public external open class Response(body: Dynamic? = definedExternally, init: Re
|
||||
}
|
||||
}
|
||||
|
||||
public external interface ResponseInit {
|
||||
public external interface ResponseInit : JsAny {
|
||||
var status: Short? /* = 200 */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var statusText: String? /* = "OK" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var headers: Dynamic?
|
||||
var headers: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ResponseInit(status: Short? = 200, statusText: String? = "OK", headers: Dynamic? = undefined): ResponseInit {
|
||||
val o = newJsObject()
|
||||
o["status"] = status
|
||||
o["statusText"] = statusText
|
||||
o["headers"] = headers
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ResponseInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ResponseInit(status: Short? = 200, statusText: String? = "OK", headers: JsAny? = undefined): ResponseInit { js("return { status, statusText, headers };") }
|
||||
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface RequestType {
|
||||
public external interface RequestType : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -197,7 +172,7 @@ public inline val RequestType.Companion.VIDEO: RequestType get() = "video".asDyn
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface RequestDestination {
|
||||
public external interface RequestDestination : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -234,7 +209,7 @@ public inline val RequestDestination.Companion.XSLT: RequestDestination get() =
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface RequestMode {
|
||||
public external interface RequestMode : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -249,7 +224,7 @@ public inline val RequestMode.Companion.CORS: RequestMode get() = "cors".asDynam
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface RequestCredentials {
|
||||
public external interface RequestCredentials : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -262,7 +237,7 @@ public inline val RequestCredentials.Companion.INCLUDE: RequestCredentials get()
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface RequestCache {
|
||||
public external interface RequestCache : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -281,7 +256,7 @@ public inline val RequestCache.Companion.ONLY_IF_CACHED: RequestCache get() = "o
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface RequestRedirect {
|
||||
public external interface RequestRedirect : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -294,7 +269,7 @@ public inline val RequestRedirect.Companion.MANUAL: RequestRedirect get() = "man
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface ResponseType {
|
||||
public external interface ResponseType : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
|
||||
@@ -17,71 +17,57 @@ import org.w3c.xhr.*
|
||||
/**
|
||||
* Exposes the JavaScript [Blob](https://developer.mozilla.org/en/docs/Web/API/Blob) to Kotlin
|
||||
*/
|
||||
public external open class Blob(blobParts: Array<Dynamic?> = definedExternally, options: BlobPropertyBag = definedExternally) : MediaProvider, ImageBitmapSource {
|
||||
open val size: Number
|
||||
public external open class Blob(blobParts: JsArray<JsAny?> = definedExternally, options: BlobPropertyBag = definedExternally) : MediaProvider, ImageBitmapSource, JsAny {
|
||||
open val size: JsNumber
|
||||
open val type: String
|
||||
open val isClosed: Boolean
|
||||
fun slice(start: Int = definedExternally, end: Int = definedExternally, contentType: String = definedExternally): Blob
|
||||
fun close()
|
||||
}
|
||||
|
||||
public external interface BlobPropertyBag {
|
||||
public external interface BlobPropertyBag : JsAny {
|
||||
var type: String? /* = "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun BlobPropertyBag(type: String? = ""): BlobPropertyBag {
|
||||
val o = newJsObject()
|
||||
o["type"] = type
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as BlobPropertyBag
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun BlobPropertyBag(type: String? = ""): BlobPropertyBag { js("return { type };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [File](https://developer.mozilla.org/en/docs/Web/API/File) to Kotlin
|
||||
*/
|
||||
public external open class File(fileBits: Array<Dynamic?>, fileName: String, options: FilePropertyBag = definedExternally) : Blob {
|
||||
public external open class File(fileBits: JsArray<JsAny?>, fileName: String, options: FilePropertyBag = definedExternally) : Blob, JsAny {
|
||||
open val name: String
|
||||
open val lastModified: Int
|
||||
}
|
||||
|
||||
public external interface FilePropertyBag : BlobPropertyBag {
|
||||
public external interface FilePropertyBag : BlobPropertyBag, JsAny {
|
||||
var lastModified: Int?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun FilePropertyBag(lastModified: Int? = undefined, type: String? = ""): FilePropertyBag {
|
||||
val o = newJsObject()
|
||||
o["lastModified"] = lastModified
|
||||
o["type"] = type
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as FilePropertyBag
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun FilePropertyBag(lastModified: Int? = undefined, type: String? = ""): FilePropertyBag { js("return { lastModified, type };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [FileList](https://developer.mozilla.org/en/docs/Web/API/FileList) to Kotlin
|
||||
*/
|
||||
public external abstract class FileList : ItemArrayLike<File> {
|
||||
public external abstract class FileList : ItemArrayLike<File>, JsAny {
|
||||
override fun item(index: Int): File?
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun FileList.get(index: Int): File? = asDynamic().getAny(index)
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [FileReader](https://developer.mozilla.org/en/docs/Web/API/FileReader) to Kotlin
|
||||
*/
|
||||
public external open class FileReader : EventTarget {
|
||||
public external open class FileReader : EventTarget, JsAny {
|
||||
open val readyState: Short
|
||||
open val result: Dynamic?
|
||||
open val error: Dynamic?
|
||||
open val result: JsAny?
|
||||
open val error: JsAny?
|
||||
var onloadstart: ((ProgressEvent) -> Dynamic?)?
|
||||
var onprogress: ((ProgressEvent) -> Dynamic?)?
|
||||
var onload: ((Event) -> Dynamic?)?
|
||||
@@ -104,7 +90,7 @@ public external open class FileReader : EventTarget {
|
||||
/**
|
||||
* Exposes the JavaScript [FileReaderSync](https://developer.mozilla.org/en/docs/Web/API/FileReaderSync) to Kotlin
|
||||
*/
|
||||
public external open class FileReaderSync {
|
||||
public external open class FileReaderSync : JsAny {
|
||||
fun readAsArrayBuffer(blob: Blob): ArrayBuffer
|
||||
fun readAsBinaryString(blob: Blob): String
|
||||
fun readAsText(blob: Blob, label: String = definedExternally): String
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.w3c.workers.*
|
||||
/**
|
||||
* Exposes the JavaScript [Notification](https://developer.mozilla.org/en/docs/Web/API/Notification) to Kotlin
|
||||
*/
|
||||
public external open class Notification(title: String, options: NotificationOptions = definedExternally) : EventTarget {
|
||||
public external open class Notification(title: String, options: NotificationOptions = definedExternally) : EventTarget, JsAny {
|
||||
var onclick: ((MouseEvent) -> Dynamic?)?
|
||||
var onerror: ((Event) -> Dynamic?)?
|
||||
open val title: String
|
||||
@@ -28,15 +28,15 @@ public external open class Notification(title: String, options: NotificationOpti
|
||||
open val icon: String
|
||||
open val badge: String
|
||||
open val sound: String
|
||||
open val vibrate: Array<out Int>
|
||||
open val timestamp: Number
|
||||
open val vibrate: JsArray<out JsNumber>
|
||||
open val timestamp: JsNumber
|
||||
open val renotify: Boolean
|
||||
open val silent: Boolean
|
||||
open val noscreen: Boolean
|
||||
open val requireInteraction: Boolean
|
||||
open val sticky: Boolean
|
||||
open val data: Any?
|
||||
open val actions: Array<out NotificationAction>
|
||||
open val data: JsAny?
|
||||
open val actions: JsArray<out NotificationAction>
|
||||
fun close()
|
||||
|
||||
companion object {
|
||||
@@ -46,7 +46,7 @@ public external open class Notification(title: String, options: NotificationOpti
|
||||
}
|
||||
}
|
||||
|
||||
public external interface NotificationOptions {
|
||||
public external interface NotificationOptions : JsAny {
|
||||
var dir: NotificationDirection? /* = NotificationDirection.AUTO */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -71,10 +71,10 @@ public external interface NotificationOptions {
|
||||
var sound: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var vibrate: Dynamic?
|
||||
var vibrate: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var timestamp: Number?
|
||||
var timestamp: JsNumber?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var renotify: Boolean? /* = false */
|
||||
@@ -92,40 +92,18 @@ public external interface NotificationOptions {
|
||||
var sticky: Boolean? /* = false */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var data: Any? /* = null */
|
||||
var data: JsAny? /* = null */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var actions: Array<NotificationAction>? /* = arrayOf() */
|
||||
var actions: JsArray<NotificationAction>? /* = arrayOf() */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun NotificationOptions(dir: NotificationDirection? = NotificationDirection.AUTO, lang: String? = "", body: String? = "", tag: String? = "", image: String? = undefined, icon: String? = undefined, badge: String? = undefined, sound: String? = undefined, vibrate: Dynamic? = undefined, timestamp: Number? = undefined, renotify: Boolean? = false, silent: Boolean? = false, noscreen: Boolean? = false, requireInteraction: Boolean? = false, sticky: Boolean? = false, data: Any? = null, actions: Array<NotificationAction>? = arrayOf()): NotificationOptions {
|
||||
val o = newJsObject()
|
||||
o["dir"] = dir
|
||||
o["lang"] = lang
|
||||
o["body"] = body
|
||||
o["tag"] = tag
|
||||
o["image"] = image
|
||||
o["icon"] = icon
|
||||
o["badge"] = badge
|
||||
o["sound"] = sound
|
||||
o["vibrate"] = vibrate
|
||||
o["timestamp"] = timestamp
|
||||
o["renotify"] = renotify
|
||||
o["silent"] = silent
|
||||
o["noscreen"] = noscreen
|
||||
o["requireInteraction"] = requireInteraction
|
||||
o["sticky"] = sticky
|
||||
o["data"] = data
|
||||
o["actions"] = actions
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as NotificationOptions
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun NotificationOptions(dir: NotificationDirection? = NotificationDirection.AUTO, lang: String? = "", body: String? = "", tag: String? = "", image: String? = undefined, icon: String? = undefined, badge: String? = undefined, sound: String? = undefined, vibrate: JsAny? = undefined, timestamp: JsNumber? = undefined, renotify: Boolean? = false, silent: Boolean? = false, noscreen: Boolean? = false, requireInteraction: Boolean? = false, sticky: Boolean? = false, data: JsAny? = null, actions: JsArray<NotificationAction>? = JsArray()): NotificationOptions { js("return { dir, lang, body, tag, image, icon, badge, sound, vibrate, timestamp, renotify, silent, noscreen, requireInteraction, sticky, data, actions };") }
|
||||
|
||||
public external interface NotificationAction {
|
||||
public external interface NotificationAction : JsAny {
|
||||
var action: String?
|
||||
var title: String?
|
||||
var icon: String?
|
||||
@@ -133,36 +111,22 @@ public external interface NotificationAction {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun NotificationAction(action: String?, title: String?, icon: String? = undefined): NotificationAction {
|
||||
val o = newJsObject()
|
||||
o["action"] = action
|
||||
o["title"] = title
|
||||
o["icon"] = icon
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as NotificationAction
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun NotificationAction(action: String?, title: String?, icon: String? = undefined): NotificationAction { js("return { action, title, icon };") }
|
||||
|
||||
public external interface GetNotificationOptions {
|
||||
public external interface GetNotificationOptions : JsAny {
|
||||
var tag: String? /* = "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun GetNotificationOptions(tag: String? = ""): GetNotificationOptions {
|
||||
val o = newJsObject()
|
||||
o["tag"] = tag
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as GetNotificationOptions
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun GetNotificationOptions(tag: String? = ""): GetNotificationOptions { js("return { tag };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [NotificationEvent](https://developer.mozilla.org/en/docs/Web/API/NotificationEvent) to Kotlin
|
||||
*/
|
||||
public external open class NotificationEvent(type: String, eventInitDict: NotificationEventInit) : ExtendableEvent {
|
||||
public external open class NotificationEvent(type: String, eventInitDict: NotificationEventInit) : ExtendableEvent, JsAny {
|
||||
open val notification: Notification
|
||||
open val action: String
|
||||
|
||||
@@ -174,30 +138,20 @@ public external open class NotificationEvent(type: String, eventInitDict: Notifi
|
||||
}
|
||||
}
|
||||
|
||||
public external interface NotificationEventInit : ExtendableEventInit {
|
||||
public external interface NotificationEventInit : ExtendableEventInit, JsAny {
|
||||
var notification: Notification?
|
||||
var action: String? /* = "" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun NotificationEventInit(notification: Notification?, action: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): NotificationEventInit {
|
||||
val o = newJsObject()
|
||||
o["notification"] = notification
|
||||
o["action"] = action
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as NotificationEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun NotificationEventInit(notification: Notification?, action: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): NotificationEventInit { js("return { notification, action, bubbles, cancelable, composed };") }
|
||||
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface NotificationPermission {
|
||||
public external interface NotificationPermission : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -210,7 +164,7 @@ public inline val NotificationPermission.Companion.GRANTED: NotificationPermissi
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface NotificationDirection {
|
||||
public external interface NotificationDirection : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
|
||||
@@ -15,47 +15,47 @@ import org.w3c.dom.events.*
|
||||
/**
|
||||
* Exposes the JavaScript [Performance](https://developer.mozilla.org/en/docs/Web/API/Performance) to Kotlin
|
||||
*/
|
||||
public external abstract class Performance : EventTarget {
|
||||
public external abstract class Performance : EventTarget, JsAny {
|
||||
open val timing: PerformanceTiming
|
||||
open val navigation: PerformanceNavigation
|
||||
fun now(): Double
|
||||
}
|
||||
|
||||
public external interface GlobalPerformance {
|
||||
public external interface GlobalPerformance : JsAny {
|
||||
val performance: Performance
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [PerformanceTiming](https://developer.mozilla.org/en/docs/Web/API/PerformanceTiming) to Kotlin
|
||||
*/
|
||||
public external abstract class PerformanceTiming {
|
||||
open val navigationStart: Number
|
||||
open val unloadEventStart: Number
|
||||
open val unloadEventEnd: Number
|
||||
open val redirectStart: Number
|
||||
open val redirectEnd: Number
|
||||
open val fetchStart: Number
|
||||
open val domainLookupStart: Number
|
||||
open val domainLookupEnd: Number
|
||||
open val connectStart: Number
|
||||
open val connectEnd: Number
|
||||
open val secureConnectionStart: Number
|
||||
open val requestStart: Number
|
||||
open val responseStart: Number
|
||||
open val responseEnd: Number
|
||||
open val domLoading: Number
|
||||
open val domInteractive: Number
|
||||
open val domContentLoadedEventStart: Number
|
||||
open val domContentLoadedEventEnd: Number
|
||||
open val domComplete: Number
|
||||
open val loadEventStart: Number
|
||||
open val loadEventEnd: Number
|
||||
public external abstract class PerformanceTiming : JsAny {
|
||||
open val navigationStart: JsNumber
|
||||
open val unloadEventStart: JsNumber
|
||||
open val unloadEventEnd: JsNumber
|
||||
open val redirectStart: JsNumber
|
||||
open val redirectEnd: JsNumber
|
||||
open val fetchStart: JsNumber
|
||||
open val domainLookupStart: JsNumber
|
||||
open val domainLookupEnd: JsNumber
|
||||
open val connectStart: JsNumber
|
||||
open val connectEnd: JsNumber
|
||||
open val secureConnectionStart: JsNumber
|
||||
open val requestStart: JsNumber
|
||||
open val responseStart: JsNumber
|
||||
open val responseEnd: JsNumber
|
||||
open val domLoading: JsNumber
|
||||
open val domInteractive: JsNumber
|
||||
open val domContentLoadedEventStart: JsNumber
|
||||
open val domContentLoadedEventEnd: JsNumber
|
||||
open val domComplete: JsNumber
|
||||
open val loadEventStart: JsNumber
|
||||
open val loadEventEnd: JsNumber
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [PerformanceNavigation](https://developer.mozilla.org/en/docs/Web/API/PerformanceNavigation) to Kotlin
|
||||
*/
|
||||
public external abstract class PerformanceNavigation {
|
||||
public external abstract class PerformanceNavigation : JsAny {
|
||||
open val type: Short
|
||||
open val redirectCount: Short
|
||||
|
||||
|
||||
@@ -18,45 +18,45 @@ import org.w3c.notifications.*
|
||||
/**
|
||||
* Exposes the JavaScript [ServiceWorker](https://developer.mozilla.org/en/docs/Web/API/ServiceWorker) to Kotlin
|
||||
*/
|
||||
public external abstract class ServiceWorker : EventTarget, AbstractWorker, UnionMessagePortOrServiceWorker, UnionClientOrMessagePortOrServiceWorker {
|
||||
public external abstract class ServiceWorker : EventTarget, AbstractWorker, UnionMessagePortOrServiceWorker, UnionClientOrMessagePortOrServiceWorker, JsAny {
|
||||
open val scriptURL: String
|
||||
open val state: ServiceWorkerState
|
||||
open var onstatechange: ((Event) -> Dynamic?)?
|
||||
fun postMessage(message: Any?, transfer: Array<Dynamic?> = definedExternally)
|
||||
fun postMessage(message: JsAny?, transfer: JsArray<JsAny> = definedExternally)
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ServiceWorkerRegistration](https://developer.mozilla.org/en/docs/Web/API/ServiceWorkerRegistration) to Kotlin
|
||||
*/
|
||||
public external abstract class ServiceWorkerRegistration : EventTarget {
|
||||
public external abstract class ServiceWorkerRegistration : EventTarget, JsAny {
|
||||
open val installing: ServiceWorker?
|
||||
open val waiting: ServiceWorker?
|
||||
open val active: ServiceWorker?
|
||||
open val scope: String
|
||||
open var onupdatefound: ((Event) -> Dynamic?)?
|
||||
open val APISpace: Dynamic?
|
||||
fun update(): Promise<Unit>
|
||||
fun unregister(): Promise<Boolean>
|
||||
fun showNotification(title: String, options: NotificationOptions = definedExternally): Promise<Unit>
|
||||
fun getNotifications(filter: GetNotificationOptions = definedExternally): Promise<Array<Notification>>
|
||||
fun methodName(): Promise<Dynamic?>
|
||||
open val APISpace: JsAny?
|
||||
fun update(): Promise<Nothing?>
|
||||
fun unregister(): Promise<JsBoolean>
|
||||
fun showNotification(title: String, options: NotificationOptions = definedExternally): Promise<Nothing?>
|
||||
fun getNotifications(filter: GetNotificationOptions = definedExternally): Promise<JsArray<Notification>>
|
||||
fun methodName(): Promise<JsAny?>
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ServiceWorkerContainer](https://developer.mozilla.org/en/docs/Web/API/ServiceWorkerContainer) to Kotlin
|
||||
*/
|
||||
public external abstract class ServiceWorkerContainer : EventTarget {
|
||||
public external abstract class ServiceWorkerContainer : EventTarget, JsAny {
|
||||
open val controller: ServiceWorker?
|
||||
open val ready: Promise<ServiceWorkerRegistration>
|
||||
open var oncontrollerchange: ((Event) -> Dynamic?)?
|
||||
open var onmessage: ((MessageEvent) -> Dynamic?)?
|
||||
fun register(scriptURL: String, options: RegistrationOptions = definedExternally): Promise<ServiceWorkerRegistration>
|
||||
fun getRegistration(clientURL: String = definedExternally): Promise<Any?>
|
||||
fun getRegistrations(): Promise<Array<ServiceWorkerRegistration>>
|
||||
fun getRegistration(clientURL: String = definedExternally): Promise<JsAny?>
|
||||
fun getRegistrations(): Promise<JsArray<ServiceWorkerRegistration>>
|
||||
fun startMessages()
|
||||
}
|
||||
|
||||
public external interface RegistrationOptions {
|
||||
public external interface RegistrationOptions : JsAny {
|
||||
var scope: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -65,25 +65,18 @@ public external interface RegistrationOptions {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun RegistrationOptions(scope: String? = undefined, type: WorkerType? = WorkerType.CLASSIC): RegistrationOptions {
|
||||
val o = newJsObject()
|
||||
o["scope"] = scope
|
||||
o["type"] = type
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as RegistrationOptions
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun RegistrationOptions(scope: String? = undefined, type: WorkerType? = WorkerType.CLASSIC): RegistrationOptions { js("return { scope, type };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ServiceWorkerMessageEvent](https://developer.mozilla.org/en/docs/Web/API/ServiceWorkerMessageEvent) to Kotlin
|
||||
*/
|
||||
public external open class ServiceWorkerMessageEvent(type: String, eventInitDict: ServiceWorkerMessageEventInit = definedExternally) : Event {
|
||||
open val data: Any?
|
||||
public external open class ServiceWorkerMessageEvent(type: String, eventInitDict: ServiceWorkerMessageEventInit = definedExternally) : Event, JsAny {
|
||||
open val data: JsAny?
|
||||
open val origin: String
|
||||
open val lastEventId: String
|
||||
open val source: UnionMessagePortOrServiceWorker?
|
||||
open val ports: Array<out MessagePort>?
|
||||
open val ports: JsArray<out MessagePort>?
|
||||
|
||||
companion object {
|
||||
val NONE: Short
|
||||
@@ -93,8 +86,8 @@ public external open class ServiceWorkerMessageEvent(type: String, eventInitDict
|
||||
}
|
||||
}
|
||||
|
||||
public external interface ServiceWorkerMessageEventInit : EventInit {
|
||||
var data: Any?
|
||||
public external interface ServiceWorkerMessageEventInit : EventInit, JsAny {
|
||||
var data: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var origin: String?
|
||||
@@ -106,31 +99,18 @@ public external interface ServiceWorkerMessageEventInit : EventInit {
|
||||
var source: UnionMessagePortOrServiceWorker?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var ports: Array<MessagePort>?
|
||||
var ports: JsArray<MessagePort>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ServiceWorkerMessageEventInit(data: Any? = undefined, origin: String? = undefined, lastEventId: String? = undefined, source: UnionMessagePortOrServiceWorker? = undefined, ports: Array<MessagePort>? = undefined, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ServiceWorkerMessageEventInit {
|
||||
val o = newJsObject()
|
||||
o["data"] = data
|
||||
o["origin"] = origin
|
||||
o["lastEventId"] = lastEventId
|
||||
o["source"] = source
|
||||
o["ports"] = ports
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ServiceWorkerMessageEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ServiceWorkerMessageEventInit(data: JsAny? = undefined, origin: String? = undefined, lastEventId: String? = undefined, source: UnionMessagePortOrServiceWorker? = undefined, ports: JsArray<MessagePort>? = undefined, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ServiceWorkerMessageEventInit { js("return { data, origin, lastEventId, source, ports, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ServiceWorkerGlobalScope](https://developer.mozilla.org/en/docs/Web/API/ServiceWorkerGlobalScope) to Kotlin
|
||||
*/
|
||||
public external abstract class ServiceWorkerGlobalScope : WorkerGlobalScope {
|
||||
public external abstract class ServiceWorkerGlobalScope : WorkerGlobalScope, JsAny {
|
||||
open val clients: Clients
|
||||
open val registration: ServiceWorkerRegistration
|
||||
open var oninstall: ((Event) -> Dynamic?)?
|
||||
@@ -141,24 +121,24 @@ public external abstract class ServiceWorkerGlobalScope : WorkerGlobalScope {
|
||||
open var onnotificationclick: ((NotificationEvent) -> Dynamic?)?
|
||||
open var onnotificationclose: ((NotificationEvent) -> Dynamic?)?
|
||||
open var onfunctionalevent: ((Event) -> Dynamic?)?
|
||||
fun skipWaiting(): Promise<Unit>
|
||||
fun skipWaiting(): Promise<Nothing?>
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Client](https://developer.mozilla.org/en/docs/Web/API/Client) to Kotlin
|
||||
*/
|
||||
public external abstract class Client : UnionClientOrMessagePortOrServiceWorker {
|
||||
public external abstract class Client : UnionClientOrMessagePortOrServiceWorker, JsAny {
|
||||
open val url: String
|
||||
open val frameType: FrameType
|
||||
open val id: String
|
||||
fun postMessage(message: Any?, transfer: Array<Dynamic?> = definedExternally)
|
||||
fun postMessage(message: JsAny?, transfer: JsArray<JsAny> = definedExternally)
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [WindowClient](https://developer.mozilla.org/en/docs/Web/API/WindowClient) to Kotlin
|
||||
*/
|
||||
public external abstract class WindowClient : Client {
|
||||
open val visibilityState: Dynamic?
|
||||
public external abstract class WindowClient : Client, JsAny {
|
||||
open val visibilityState: JsAny?
|
||||
open val focused: Boolean
|
||||
fun focus(): Promise<WindowClient>
|
||||
fun navigate(url: String): Promise<WindowClient>
|
||||
@@ -167,14 +147,14 @@ public external abstract class WindowClient : Client {
|
||||
/**
|
||||
* Exposes the JavaScript [Clients](https://developer.mozilla.org/en/docs/Web/API/Clients) to Kotlin
|
||||
*/
|
||||
public external abstract class Clients {
|
||||
fun get(id: String): Promise<Any?>
|
||||
fun matchAll(options: ClientQueryOptions = definedExternally): Promise<Array<Client>>
|
||||
public external abstract class Clients : JsAny {
|
||||
fun get(id: String): Promise<JsAny?>
|
||||
fun matchAll(options: ClientQueryOptions = definedExternally): Promise<JsArray<Client>>
|
||||
fun openWindow(url: String): Promise<WindowClient?>
|
||||
fun claim(): Promise<Unit>
|
||||
fun claim(): Promise<Nothing?>
|
||||
}
|
||||
|
||||
public external interface ClientQueryOptions {
|
||||
public external interface ClientQueryOptions : JsAny {
|
||||
var includeUncontrolled: Boolean? /* = false */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -183,21 +163,14 @@ public external interface ClientQueryOptions {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ClientQueryOptions(includeUncontrolled: Boolean? = false, type: ClientType? = ClientType.WINDOW): ClientQueryOptions {
|
||||
val o = newJsObject()
|
||||
o["includeUncontrolled"] = includeUncontrolled
|
||||
o["type"] = type
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ClientQueryOptions
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ClientQueryOptions(includeUncontrolled: Boolean? = false, type: ClientType? = ClientType.WINDOW): ClientQueryOptions { js("return { includeUncontrolled, type };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ExtendableEvent](https://developer.mozilla.org/en/docs/Web/API/ExtendableEvent) to Kotlin
|
||||
*/
|
||||
public external open class ExtendableEvent(type: String, eventInitDict: ExtendableEventInit = definedExternally) : Event {
|
||||
fun waitUntil(f: Promise<Any?>)
|
||||
public external open class ExtendableEvent(type: String, eventInitDict: ExtendableEventInit = definedExternally) : Event, JsAny {
|
||||
fun waitUntil(f: Promise<JsAny?>)
|
||||
|
||||
companion object {
|
||||
val NONE: Short
|
||||
@@ -207,23 +180,15 @@ public external open class ExtendableEvent(type: String, eventInitDict: Extendab
|
||||
}
|
||||
}
|
||||
|
||||
public external interface ExtendableEventInit : EventInit
|
||||
public external interface ExtendableEventInit : EventInit, JsAny
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ExtendableEventInit(bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ExtendableEventInit {
|
||||
val o = newJsObject()
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ExtendableEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ExtendableEventInit(bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ExtendableEventInit { js("return { bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [InstallEvent](https://developer.mozilla.org/en/docs/Web/API/InstallEvent) to Kotlin
|
||||
*/
|
||||
public external open class InstallEvent(type: String, eventInitDict: ExtendableEventInit = definedExternally) : ExtendableEvent {
|
||||
public external open class InstallEvent(type: String, eventInitDict: ExtendableEventInit = definedExternally) : ExtendableEvent, JsAny {
|
||||
fun registerForeignFetch(options: ForeignFetchOptions)
|
||||
|
||||
companion object {
|
||||
@@ -234,25 +199,18 @@ public external open class InstallEvent(type: String, eventInitDict: ExtendableE
|
||||
}
|
||||
}
|
||||
|
||||
public external interface ForeignFetchOptions {
|
||||
var scopes: Array<String>?
|
||||
var origins: Array<String>?
|
||||
public external interface ForeignFetchOptions : JsAny {
|
||||
var scopes: JsArray<JsString>?
|
||||
var origins: JsArray<JsString>?
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ForeignFetchOptions(scopes: Array<String>?, origins: Array<String>?): ForeignFetchOptions {
|
||||
val o = newJsObject()
|
||||
o["scopes"] = scopes
|
||||
o["origins"] = origins
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ForeignFetchOptions
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ForeignFetchOptions(scopes: JsArray<JsString>?, origins: JsArray<JsString>?): ForeignFetchOptions { js("return { scopes, origins };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [FetchEvent](https://developer.mozilla.org/en/docs/Web/API/FetchEvent) to Kotlin
|
||||
*/
|
||||
public external open class FetchEvent(type: String, eventInitDict: FetchEventInit) : ExtendableEvent {
|
||||
public external open class FetchEvent(type: String, eventInitDict: FetchEventInit) : ExtendableEvent, JsAny {
|
||||
open val request: Request
|
||||
open val clientId: String?
|
||||
open val isReload: Boolean
|
||||
@@ -266,7 +224,7 @@ public external open class FetchEvent(type: String, eventInitDict: FetchEventIni
|
||||
}
|
||||
}
|
||||
|
||||
public external interface FetchEventInit : ExtendableEventInit {
|
||||
public external interface FetchEventInit : ExtendableEventInit, JsAny {
|
||||
var request: Request?
|
||||
var clientId: String? /* = null */
|
||||
get() = definedExternally
|
||||
@@ -276,21 +234,10 @@ public external interface FetchEventInit : ExtendableEventInit {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun FetchEventInit(request: Request?, clientId: String? = null, isReload: Boolean? = false, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): FetchEventInit {
|
||||
val o = newJsObject()
|
||||
o["request"] = request
|
||||
o["clientId"] = clientId
|
||||
o["isReload"] = isReload
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as FetchEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun FetchEventInit(request: Request?, clientId: String? = null, isReload: Boolean? = false, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): FetchEventInit { js("return { request, clientId, isReload, bubbles, cancelable, composed };") }
|
||||
|
||||
public external open class ForeignFetchEvent(type: String, eventInitDict: ForeignFetchEventInit) : ExtendableEvent {
|
||||
public external open class ForeignFetchEvent(type: String, eventInitDict: ForeignFetchEventInit) : ExtendableEvent, JsAny {
|
||||
open val request: Request
|
||||
open val origin: String
|
||||
fun respondWith(r: Promise<ForeignFetchResponse>)
|
||||
@@ -303,56 +250,38 @@ public external open class ForeignFetchEvent(type: String, eventInitDict: Foreig
|
||||
}
|
||||
}
|
||||
|
||||
public external interface ForeignFetchEventInit : ExtendableEventInit {
|
||||
public external interface ForeignFetchEventInit : ExtendableEventInit, JsAny {
|
||||
var request: Request?
|
||||
var origin: String? /* = "null" */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ForeignFetchEventInit(request: Request?, origin: String? = "null", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ForeignFetchEventInit {
|
||||
val o = newJsObject()
|
||||
o["request"] = request
|
||||
o["origin"] = origin
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ForeignFetchEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ForeignFetchEventInit(request: Request?, origin: String? = "null", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ForeignFetchEventInit { js("return { request, origin, bubbles, cancelable, composed };") }
|
||||
|
||||
public external interface ForeignFetchResponse {
|
||||
public external interface ForeignFetchResponse : JsAny {
|
||||
var response: Response?
|
||||
var origin: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var headers: Array<String>?
|
||||
var headers: JsArray<JsString>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ForeignFetchResponse(response: Response?, origin: String? = undefined, headers: Array<String>? = undefined): ForeignFetchResponse {
|
||||
val o = newJsObject()
|
||||
o["response"] = response
|
||||
o["origin"] = origin
|
||||
o["headers"] = headers
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ForeignFetchResponse
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ForeignFetchResponse(response: Response?, origin: String? = undefined, headers: JsArray<JsString>? = undefined): ForeignFetchResponse { js("return { response, origin, headers };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [ExtendableMessageEvent](https://developer.mozilla.org/en/docs/Web/API/ExtendableMessageEvent) to Kotlin
|
||||
*/
|
||||
public external open class ExtendableMessageEvent(type: String, eventInitDict: ExtendableMessageEventInit = definedExternally) : ExtendableEvent {
|
||||
open val data: Any?
|
||||
public external open class ExtendableMessageEvent(type: String, eventInitDict: ExtendableMessageEventInit = definedExternally) : ExtendableEvent, JsAny {
|
||||
open val data: JsAny?
|
||||
open val origin: String
|
||||
open val lastEventId: String
|
||||
open val source: UnionClientOrMessagePortOrServiceWorker?
|
||||
open val ports: Array<out MessagePort>?
|
||||
open val ports: JsArray<out MessagePort>?
|
||||
|
||||
companion object {
|
||||
val NONE: Short
|
||||
@@ -362,8 +291,8 @@ public external open class ExtendableMessageEvent(type: String, eventInitDict: E
|
||||
}
|
||||
}
|
||||
|
||||
public external interface ExtendableMessageEventInit : ExtendableEventInit {
|
||||
var data: Any?
|
||||
public external interface ExtendableMessageEventInit : ExtendableEventInit, JsAny {
|
||||
var data: JsAny?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var origin: String?
|
||||
@@ -375,41 +304,28 @@ public external interface ExtendableMessageEventInit : ExtendableEventInit {
|
||||
var source: UnionClientOrMessagePortOrServiceWorker?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var ports: Array<MessagePort>?
|
||||
var ports: JsArray<MessagePort>?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ExtendableMessageEventInit(data: Any? = undefined, origin: String? = undefined, lastEventId: String? = undefined, source: UnionClientOrMessagePortOrServiceWorker? = undefined, ports: Array<MessagePort>? = undefined, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ExtendableMessageEventInit {
|
||||
val o = newJsObject()
|
||||
o["data"] = data
|
||||
o["origin"] = origin
|
||||
o["lastEventId"] = lastEventId
|
||||
o["source"] = source
|
||||
o["ports"] = ports
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ExtendableMessageEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ExtendableMessageEventInit(data: JsAny? = undefined, origin: String? = undefined, lastEventId: String? = undefined, source: UnionClientOrMessagePortOrServiceWorker? = undefined, ports: JsArray<MessagePort>? = undefined, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ExtendableMessageEventInit { js("return { data, origin, lastEventId, source, ports, bubbles, cancelable, composed };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [Cache](https://developer.mozilla.org/en/docs/Web/API/Cache) to Kotlin
|
||||
*/
|
||||
public external abstract class Cache {
|
||||
fun match(request: Dynamic?, options: CacheQueryOptions = definedExternally): Promise<Any?>
|
||||
fun matchAll(request: Dynamic? = definedExternally, options: CacheQueryOptions = definedExternally): Promise<Array<Response>>
|
||||
fun add(request: Dynamic?): Promise<Unit>
|
||||
fun addAll(requests: Array<Dynamic?>): Promise<Unit>
|
||||
fun put(request: Dynamic?, response: Response): Promise<Unit>
|
||||
fun delete(request: Dynamic?, options: CacheQueryOptions = definedExternally): Promise<Boolean>
|
||||
fun keys(request: Dynamic? = definedExternally, options: CacheQueryOptions = definedExternally): Promise<Array<Request>>
|
||||
public external abstract class Cache : JsAny {
|
||||
fun match(request: JsAny?, options: CacheQueryOptions = definedExternally): Promise<JsAny?>
|
||||
fun matchAll(request: JsAny? = definedExternally, options: CacheQueryOptions = definedExternally): Promise<JsArray<Response>>
|
||||
fun add(request: JsAny?): Promise<Nothing?>
|
||||
fun addAll(requests: JsArray<JsAny?>): Promise<Nothing?>
|
||||
fun put(request: JsAny?, response: Response): Promise<Nothing?>
|
||||
fun delete(request: JsAny?, options: CacheQueryOptions = definedExternally): Promise<JsBoolean>
|
||||
fun keys(request: JsAny? = definedExternally, options: CacheQueryOptions = definedExternally): Promise<JsArray<Request>>
|
||||
}
|
||||
|
||||
public external interface CacheQueryOptions {
|
||||
public external interface CacheQueryOptions : JsAny {
|
||||
var ignoreSearch: Boolean? /* = false */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -424,19 +340,10 @@ public external interface CacheQueryOptions {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun CacheQueryOptions(ignoreSearch: Boolean? = false, ignoreMethod: Boolean? = false, ignoreVary: Boolean? = false, cacheName: String? = undefined): CacheQueryOptions {
|
||||
val o = newJsObject()
|
||||
o["ignoreSearch"] = ignoreSearch
|
||||
o["ignoreMethod"] = ignoreMethod
|
||||
o["ignoreVary"] = ignoreVary
|
||||
o["cacheName"] = cacheName
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as CacheQueryOptions
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun CacheQueryOptions(ignoreSearch: Boolean? = false, ignoreMethod: Boolean? = false, ignoreVary: Boolean? = false, cacheName: String? = undefined): CacheQueryOptions { js("return { ignoreSearch, ignoreMethod, ignoreVary, cacheName };") }
|
||||
|
||||
public external interface CacheBatchOperation {
|
||||
public external interface CacheBatchOperation : JsAny {
|
||||
var type: String?
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
@@ -451,30 +358,21 @@ public external interface CacheBatchOperation {
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun CacheBatchOperation(type: String? = undefined, request: Request? = undefined, response: Response? = undefined, options: CacheQueryOptions? = undefined): CacheBatchOperation {
|
||||
val o = newJsObject()
|
||||
o["type"] = type
|
||||
o["request"] = request
|
||||
o["response"] = response
|
||||
o["options"] = options
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as CacheBatchOperation
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun CacheBatchOperation(type: String? = undefined, request: Request? = undefined, response: Response? = undefined, options: CacheQueryOptions? = undefined): CacheBatchOperation { js("return { type, request, response, options };") }
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [CacheStorage](https://developer.mozilla.org/en/docs/Web/API/CacheStorage) to Kotlin
|
||||
*/
|
||||
public external abstract class CacheStorage {
|
||||
fun match(request: Dynamic?, options: CacheQueryOptions = definedExternally): Promise<Any?>
|
||||
fun has(cacheName: String): Promise<Boolean>
|
||||
public external abstract class CacheStorage : JsAny {
|
||||
fun match(request: JsAny?, options: CacheQueryOptions = definedExternally): Promise<JsAny?>
|
||||
fun has(cacheName: String): Promise<JsBoolean>
|
||||
fun open(cacheName: String): Promise<Cache>
|
||||
fun delete(cacheName: String): Promise<Boolean>
|
||||
fun keys(): Promise<Array<String>>
|
||||
fun delete(cacheName: String): Promise<JsBoolean>
|
||||
fun keys(): Promise<JsArray<JsString>>
|
||||
}
|
||||
|
||||
public external open class FunctionalEvent : ExtendableEvent {
|
||||
public external open class FunctionalEvent : ExtendableEvent, JsAny {
|
||||
companion object {
|
||||
val NONE: Short
|
||||
val CAPTURING_PHASE: Short
|
||||
@@ -490,7 +388,7 @@ public external interface UnionClientOrMessagePortOrServiceWorker
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface ServiceWorkerState {
|
||||
public external interface ServiceWorkerState : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -507,7 +405,7 @@ public inline val ServiceWorkerState.Companion.REDUNDANT: ServiceWorkerState get
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface FrameType {
|
||||
public external interface FrameType : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -522,7 +420,7 @@ public inline val FrameType.Companion.NONE: FrameType get() = "none".asDynamic()
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface ClientType {
|
||||
public external interface ClientType : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.w3c.files.*
|
||||
/**
|
||||
* Exposes the JavaScript [XMLHttpRequestEventTarget](https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequestEventTarget) to Kotlin
|
||||
*/
|
||||
public external abstract class XMLHttpRequestEventTarget : EventTarget {
|
||||
public external abstract class XMLHttpRequestEventTarget : EventTarget, JsAny {
|
||||
open var onloadstart: ((ProgressEvent) -> Dynamic?)?
|
||||
open var onprogress: ((ProgressEvent) -> Dynamic?)?
|
||||
open var onabort: ((Event) -> Dynamic?)?
|
||||
@@ -27,12 +27,12 @@ public external abstract class XMLHttpRequestEventTarget : EventTarget {
|
||||
open var onloadend: ((Event) -> Dynamic?)?
|
||||
}
|
||||
|
||||
public external abstract class XMLHttpRequestUpload : XMLHttpRequestEventTarget
|
||||
public external abstract class XMLHttpRequestUpload : XMLHttpRequestEventTarget, JsAny
|
||||
|
||||
/**
|
||||
* Exposes the JavaScript [XMLHttpRequest](https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest) to Kotlin
|
||||
*/
|
||||
public external open class XMLHttpRequest : XMLHttpRequestEventTarget {
|
||||
public external open class XMLHttpRequest : XMLHttpRequestEventTarget, JsAny {
|
||||
var onreadystatechange: ((Event) -> Dynamic?)?
|
||||
open val readyState: Short
|
||||
var timeout: Int
|
||||
@@ -42,13 +42,13 @@ public external open class XMLHttpRequest : XMLHttpRequestEventTarget {
|
||||
open val status: Short
|
||||
open val statusText: String
|
||||
var responseType: XMLHttpRequestResponseType
|
||||
open val response: Any?
|
||||
open val response: JsAny?
|
||||
open val responseText: String
|
||||
open val responseXML: Document?
|
||||
fun open(method: String, url: String)
|
||||
fun open(method: String, url: String, async: Boolean, username: String? = definedExternally, password: String? = definedExternally)
|
||||
fun setRequestHeader(name: String, value: String)
|
||||
fun send(body: Dynamic? = definedExternally)
|
||||
fun send(body: JsAny? = definedExternally)
|
||||
fun abort()
|
||||
fun getResponseHeader(name: String): String?
|
||||
fun getAllResponseHeaders(): String
|
||||
@@ -66,12 +66,12 @@ public external open class XMLHttpRequest : XMLHttpRequestEventTarget {
|
||||
/**
|
||||
* Exposes the JavaScript [FormData](https://developer.mozilla.org/en/docs/Web/API/FormData) to Kotlin
|
||||
*/
|
||||
public external open class FormData(form: HTMLFormElement = definedExternally) {
|
||||
public external open class FormData(form: HTMLFormElement = definedExternally) : JsAny {
|
||||
fun append(name: String, value: String)
|
||||
fun append(name: String, value: Blob, filename: String = definedExternally)
|
||||
fun delete(name: String)
|
||||
fun get(name: String): Dynamic?
|
||||
fun getAll(name: String): Array<Dynamic?>
|
||||
fun get(name: String): JsAny?
|
||||
fun getAll(name: String): JsArray<JsAny?>
|
||||
fun has(name: String): Boolean
|
||||
fun set(name: String, value: String)
|
||||
fun set(name: String, value: Blob, filename: String = definedExternally)
|
||||
@@ -80,10 +80,10 @@ public external open class FormData(form: HTMLFormElement = definedExternally) {
|
||||
/**
|
||||
* Exposes the JavaScript [ProgressEvent](https://developer.mozilla.org/en/docs/Web/API/ProgressEvent) to Kotlin
|
||||
*/
|
||||
public external open class ProgressEvent(type: String, eventInitDict: ProgressEventInit = definedExternally) : Event {
|
||||
public external open class ProgressEvent(type: String, eventInitDict: ProgressEventInit = definedExternally) : Event, JsAny {
|
||||
open val lengthComputable: Boolean
|
||||
open val loaded: Number
|
||||
open val total: Number
|
||||
open val loaded: JsNumber
|
||||
open val total: JsNumber
|
||||
|
||||
companion object {
|
||||
val NONE: Short
|
||||
@@ -93,36 +93,25 @@ public external open class ProgressEvent(type: String, eventInitDict: ProgressEv
|
||||
}
|
||||
}
|
||||
|
||||
public external interface ProgressEventInit : EventInit {
|
||||
public external interface ProgressEventInit : EventInit, JsAny {
|
||||
var lengthComputable: Boolean? /* = false */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var loaded: Number? /* = 0 */
|
||||
var loaded: JsNumber? /* = 0 */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
var total: Number? /* = 0 */
|
||||
var total: JsNumber? /* = 0 */
|
||||
get() = definedExternally
|
||||
set(value) = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun ProgressEventInit(lengthComputable: Boolean? = false, loaded: Number? = 0, total: Number? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ProgressEventInit {
|
||||
val o = newJsObject()
|
||||
o["lengthComputable"] = lengthComputable
|
||||
o["loaded"] = loaded
|
||||
o["total"] = total
|
||||
o["bubbles"] = bubbles
|
||||
o["cancelable"] = cancelable
|
||||
o["composed"] = composed
|
||||
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
|
||||
return o as ProgressEventInit
|
||||
}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun ProgressEventInit(lengthComputable: Boolean? = false, loaded: JsNumber? = 0.toJsNumber(), total: JsNumber? = 0.toJsNumber(), bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ProgressEventInit { js("return { lengthComputable, loaded, total, bubbles, cancelable, composed };") }
|
||||
|
||||
/* please, don't implement this interface! */
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface XMLHttpRequestResponseType {
|
||||
public external interface XMLHttpRequestResponseType : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
|
||||
+2
-53
@@ -5,16 +5,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.tools.dukat
|
||||
|
||||
import org.jetbrains.dukat.astModel.SourceSetModel
|
||||
import org.jetbrains.dukat.astModel.modifiers.VisibilityModifierModel
|
||||
import org.jetbrains.dukat.commonLowerings.AddExplicitGettersAndSetters
|
||||
import org.jetbrains.dukat.idlLowerings.*
|
||||
import org.jetbrains.dukat.idlParser.parseIDL
|
||||
import org.jetbrains.dukat.idlReferenceResolver.DirectoryReferencesResolver
|
||||
import org.jetbrains.dukat.model.commonLowerings.*
|
||||
import org.jetbrains.dukat.translatorString.compileUnits
|
||||
import org.jetbrains.dukat.translatorString.translateSourceSet
|
||||
import org.jetbrains.kotlin.tools.dukat.wasm.convertToWasmModel
|
||||
import org.jetbrains.kotlin.tools.dukat.wasm.translateIdlToSourceSet
|
||||
import java.io.File
|
||||
|
||||
fun main() {
|
||||
@@ -26,51 +19,7 @@ fun main() {
|
||||
|
||||
File(outputDirectory).walk().forEach {
|
||||
if (it.isFile && it.name.endsWith(".kt")) {
|
||||
it.writeText(getHeader() + postProcessIdlBindings(it.readText()))
|
||||
it.writeText(getHeader() + it.readText())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun translateIdlToSourceSet(fileName: String): SourceSetModel {
|
||||
val translationContext = TranslationContext()
|
||||
return parseIDL(fileName, DirectoryReferencesResolver())
|
||||
.resolvePartials()
|
||||
.addConstructors()
|
||||
.resolveTypedefs()
|
||||
.specifyEventHandlerTypes()
|
||||
.specifyDefaultValues()
|
||||
.resolveImplementsStatements()
|
||||
.resolveMixins()
|
||||
.addItemArrayLike()
|
||||
.resolveTypes()
|
||||
.markAbstractOrOpen()
|
||||
.addMissingMembers()
|
||||
.addOverloadsForCallbacks()
|
||||
.convertToWasmModel()
|
||||
.lower(
|
||||
ModelContextAwareLowering(translationContext),
|
||||
LowerOverrides(translationContext),
|
||||
EscapeIdentificators(),
|
||||
AddExplicitGettersAndSetters(),
|
||||
)
|
||||
.lower(ReplaceDynamics()) // Wasm-specific
|
||||
.addKDocs()
|
||||
.relocateDeclarations()
|
||||
.resolveTopLevelVisibility(alwaysPublic())
|
||||
.addImportsForUsedPackages()
|
||||
.omitStdLib()
|
||||
}
|
||||
|
||||
private fun alwaysPublic(): VisibilityModifierResolver = object : VisibilityModifierResolver {
|
||||
override fun resolve(): VisibilityModifierModel = VisibilityModifierModel.PUBLIC
|
||||
}
|
||||
|
||||
// TODO: Backport to dukat
|
||||
fun postProcessIdlBindings(source: String): String {
|
||||
return source
|
||||
.replace(
|
||||
Regex("( {4}return o as \\w+)"),
|
||||
" @Suppress(\"UNCHECKED_CAST_TO_EXTERNAL_INTERFACE\")\n\$1"
|
||||
)
|
||||
.replace("js(\"({})\")", "newJsObject()")
|
||||
}
|
||||
+76
-95
@@ -54,6 +54,18 @@ import org.jetbrains.dukat.stdlib.isTsStdlibPrefixed
|
||||
import org.jetbrains.dukat.translator.ROOT_PACKAGENAME
|
||||
import java.io.File
|
||||
|
||||
private val jsAnyHeritageModel: HeritageModel = HeritageModel(
|
||||
TypeValueModel(
|
||||
IdentifierEntity("JsAny"),
|
||||
emptyList(),
|
||||
null,
|
||||
null,
|
||||
false
|
||||
),
|
||||
listOf(),
|
||||
null
|
||||
)
|
||||
|
||||
private fun IDLDeclaration.resolveName(): String? {
|
||||
return when (this) {
|
||||
is IDLDictionaryDeclaration -> name
|
||||
@@ -94,32 +106,43 @@ private class IdlFileConverter(
|
||||
val toStdMap = mapOf(
|
||||
"ByteString" to "String",
|
||||
"CSSOMString" to "String",
|
||||
"DOMError" to "dynamic",
|
||||
"DOMError" to "JsAny",
|
||||
"DOMString" to "String",
|
||||
"FrozenArray" to "Array",
|
||||
"FrozenArray" to "JsArray",
|
||||
"Promise" to "Promise",
|
||||
"USVString" to "String",
|
||||
"\$Array" to "Array",
|
||||
"\$dynamic" to "dynamic",
|
||||
"any" to "Any",
|
||||
"\$Array" to "JsArray",
|
||||
"\$dynamic" to "JsAny",
|
||||
"any" to "JsAny",
|
||||
"boolean" to "Boolean",
|
||||
"byte" to "Byte",
|
||||
"double" to "Double",
|
||||
"float" to "Float",
|
||||
"long" to "Int",
|
||||
"longlong" to "Int",
|
||||
"object" to "dynamic",
|
||||
"object" to "JsAny",
|
||||
"octet" to "Byte",
|
||||
"record" to "dynamic",
|
||||
"sequence" to "Array",
|
||||
"record" to "JsAny",
|
||||
"sequence" to "JsArray",
|
||||
"short" to "Short",
|
||||
"unrestricteddouble" to "Double",
|
||||
"unrestrictedfloat" to "Float",
|
||||
"unsignedlong" to "Int",
|
||||
"unsignedlonglong" to "Number",
|
||||
"unsignedlonglong" to "JsNumber",
|
||||
"unsignedshort" to "Short",
|
||||
"void" to "Unit"
|
||||
)
|
||||
|
||||
val kotlinToExternalType = mapOf(
|
||||
"String" to "JsString",
|
||||
"Byte" to "JsNumber",
|
||||
"Short" to "JsNumber",
|
||||
"Int" to "JsNumber",
|
||||
"Float" to "JsNumber",
|
||||
"Double" to "JsNumber",
|
||||
"Boolean" to "JsBoolean",
|
||||
"Unit" to "Nothing?"
|
||||
)
|
||||
}
|
||||
|
||||
private val staticConverterNames = setOf(
|
||||
@@ -166,12 +189,14 @@ private class IdlFileConverter(
|
||||
return stdFqName() ?: fileDeclaration.packageName?.appendLeft(IdentifierEntity(this))
|
||||
}
|
||||
|
||||
private fun IDLSingleTypeDeclaration.convertToModel(): TypeValueModel {
|
||||
val resolvedName = toStdMap[name] ?: name
|
||||
private fun IDLSingleTypeDeclaration.convertToModel(isTypeParameter: Boolean = false): TypeValueModel {
|
||||
var resolvedName = toStdMap[name] ?: name
|
||||
if (isTypeParameter)
|
||||
resolvedName = kotlinToExternalType[resolvedName] ?: resolvedName
|
||||
|
||||
val typeModel = TypeValueModel(
|
||||
value = IdentifierEntity(resolvedName),
|
||||
params = listOfNotNull(typeParameter?.convertToModel())
|
||||
params = listOfNotNull(typeParameter?.convertToModel(isTypeParameter = true))
|
||||
.map { TypeParameterModel(it, listOf()) }
|
||||
.map {
|
||||
if (name == "FrozenArray") {
|
||||
@@ -185,9 +210,9 @@ private class IdlFileConverter(
|
||||
)
|
||||
|
||||
return typeModel.copy(
|
||||
nullable = when (typeModel.value) {
|
||||
IdentifierEntity("dynamic") -> false
|
||||
IdentifierEntity("Any") -> true
|
||||
nullable = when (name) {
|
||||
"\$dynamic" -> true
|
||||
"any" -> true
|
||||
else -> nullable
|
||||
}
|
||||
)
|
||||
@@ -209,9 +234,9 @@ private class IdlFileConverter(
|
||||
)
|
||||
}
|
||||
|
||||
private fun IDLTypeDeclaration.convertToModel(): TypeModel {
|
||||
private fun IDLTypeDeclaration.convertToModel(isTypeParameter: Boolean = false): TypeModel {
|
||||
return when (this) {
|
||||
is IDLSingleTypeDeclaration -> convertToModel()
|
||||
is IDLSingleTypeDeclaration -> convertToModel(isTypeParameter)
|
||||
is IDLFunctionTypeDeclaration -> convertToModel()
|
||||
//there shouldn't be any UnionTypeDeclarations at this stage
|
||||
else -> raiseConcern("unprocessed type declaration: ${this}") {
|
||||
@@ -269,13 +294,6 @@ private class IdlFileConverter(
|
||||
),
|
||||
typeParameters = listOf(),
|
||||
annotations = mutableListOf(
|
||||
AnnotationModel(
|
||||
name = IdentifierEntity("Suppress"),
|
||||
params = listOf(
|
||||
IdentifierEntity("INVISIBLE_REFERENCE"),
|
||||
IdentifierEntity("INVISIBLE_MEMBER")
|
||||
)
|
||||
),
|
||||
INLINE_ONLY_ANNOTATION
|
||||
),
|
||||
export = false,
|
||||
@@ -312,13 +330,6 @@ private class IdlFileConverter(
|
||||
type = valueType.toNullableIfNotPrimitive().convertToModel(),
|
||||
typeParameters = listOf(),
|
||||
annotations = mutableListOf(
|
||||
AnnotationModel(
|
||||
name = IdentifierEntity("Suppress"),
|
||||
params = listOf(
|
||||
IdentifierEntity("INVISIBLE_REFERENCE"),
|
||||
IdentifierEntity("INVISIBLE_MEMBER")
|
||||
)
|
||||
),
|
||||
INLINE_ONLY_ANNOTATION
|
||||
),
|
||||
export = false,
|
||||
@@ -409,7 +420,7 @@ private class IdlFileConverter(
|
||||
members = dynamicMemberModels,
|
||||
companionObject = companionObjectModel,
|
||||
typeParameters = listOf(),
|
||||
parentEntities = parentModels,
|
||||
parentEntities = parentModels + jsAnyHeritageModel,
|
||||
comment = null,
|
||||
annotations = annotationModels,
|
||||
external = true,
|
||||
@@ -421,7 +432,7 @@ private class IdlFileConverter(
|
||||
members = dynamicMemberModels,
|
||||
companionObject = companionObjectModel,
|
||||
typeParameters = listOf(),
|
||||
parentEntities = parentModels,
|
||||
parentEntities = parentModels + jsAnyHeritageModel,
|
||||
primaryConstructor = if (primaryConstructor != null) {
|
||||
primaryConstructor!!.convertToModel() as ConstructorModel
|
||||
} else {
|
||||
@@ -449,10 +460,23 @@ private class IdlFileConverter(
|
||||
name = name,
|
||||
type = type,
|
||||
initializer = if (defaultValue != null && !required) {
|
||||
val typeString = (type as? TypeValueModel)?.value.toString()
|
||||
val newDefaultValue = when {
|
||||
typeString.startsWith("Js") && defaultValue == "arrayOf()" ->
|
||||
"JsArray()"
|
||||
|
||||
typeString.startsWith("Js") && (defaultValue == "true" || defaultValue == "false") ->
|
||||
"$defaultValue.toJsBoolean()"
|
||||
|
||||
typeString.startsWith("Js") && defaultValue == "0" ->
|
||||
"$defaultValue.toJsNumber()"
|
||||
|
||||
else -> defaultValue
|
||||
}
|
||||
val defaultValueModel = IdentifierExpressionModel(
|
||||
IdentifierEntity(defaultValue!!)
|
||||
IdentifierEntity(newDefaultValue!!)
|
||||
)
|
||||
if (defaultValue != "undefined" && type is TypeValueModel && type.value.isDynamic) {
|
||||
if (newDefaultValue != "undefined" && type is TypeValueModel && type.value.isDynamic) {
|
||||
ExpressionStatementModel(
|
||||
PropertyAccessExpressionModel(
|
||||
defaultValueModel,
|
||||
@@ -490,57 +514,18 @@ private class IdlFileConverter(
|
||||
)
|
||||
}
|
||||
|
||||
fun IDLDictionaryDeclaration.generateFunctionBody(): List<StatementModel> {
|
||||
val functionBody: MutableList<StatementModel> = mutableListOf(
|
||||
VariableModel(
|
||||
name = IdentifierEntity("o"),
|
||||
immutable = true,
|
||||
inline = false,
|
||||
external = false,
|
||||
get = null,
|
||||
set = null,
|
||||
extend = null,
|
||||
comment = null,
|
||||
explicitlyDeclaredType = false,
|
||||
typeParameters = listOf(),
|
||||
annotations = mutableListOf(),
|
||||
visibilityModifier = VisibilityModifierModel.DEFAULT,
|
||||
type = TypeValueModel(
|
||||
value = IdentifierEntity("dynamic"),
|
||||
params = listOf(),
|
||||
fqName = null,
|
||||
metaDescription = null,
|
||||
),
|
||||
initializer = CallExpressionModel(
|
||||
IdentifierExpressionModel(
|
||||
IdentifierEntity("js")
|
||||
),
|
||||
listOf(
|
||||
StringLiteralExpressionModel(
|
||||
"({})"
|
||||
)
|
||||
)
|
||||
)
|
||||
fun callJsFunction(code: String): CallExpressionModel =
|
||||
CallExpressionModel(
|
||||
expression = IdentifierExpressionModel(IdentifierEntity("js")),
|
||||
arguments = listOf(StringLiteralExpressionModel(code))
|
||||
)
|
||||
|
||||
fun IDLDictionaryDeclaration.generateFunctionBody(): List<StatementModel> =
|
||||
listOf<StatementModel>(
|
||||
ExpressionStatementModel(
|
||||
callJsFunction("return { ${members.joinToString { it.name }} };")
|
||||
)
|
||||
)
|
||||
functionBody.addAll(members.map { it.convertToAssignmentStatementModel() })
|
||||
functionBody.add(
|
||||
ReturnStatementModel(
|
||||
AsExpressionModel(
|
||||
expression = IdentifierExpressionModel(
|
||||
IdentifierEntity("o")
|
||||
),
|
||||
type = TypeValueModel(
|
||||
value = IdentifierEntity(name),
|
||||
params = listOf(),
|
||||
metaDescription = null,
|
||||
fqName = toFqName()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
return functionBody
|
||||
}
|
||||
|
||||
private fun IDLDictionaryDeclaration.convertToModel(): List<TopLevelModel> {
|
||||
val declaration = InterfaceModel(
|
||||
@@ -554,7 +539,7 @@ private class IdlFileConverter(
|
||||
listOf(),
|
||||
null
|
||||
)
|
||||
},
|
||||
} + jsAnyHeritageModel,
|
||||
comment = null,
|
||||
annotations = mutableListOf(),
|
||||
external = true,
|
||||
@@ -572,22 +557,18 @@ private class IdlFileConverter(
|
||||
typeParameters = listOf(),
|
||||
annotations = mutableListOf(
|
||||
AnnotationModel(
|
||||
name = IdentifierEntity("Suppress"),
|
||||
params = listOf(
|
||||
IdentifierEntity("INVISIBLE_REFERENCE"),
|
||||
IdentifierEntity("INVISIBLE_MEMBER")
|
||||
)
|
||||
),
|
||||
INLINE_ONLY_ANNOTATION
|
||||
IdentifierEntity("Suppress"),
|
||||
listOf(IdentifierEntity("UNUSED_PARAMETER"))
|
||||
)
|
||||
),
|
||||
export = false,
|
||||
inline = true,
|
||||
inline = false,
|
||||
operator = false,
|
||||
extend = null,
|
||||
body = BlockStatementModel(generateFunctionBody()),
|
||||
visibilityModifier = VisibilityModifierModel.DEFAULT,
|
||||
comment = null,
|
||||
external = true
|
||||
external = false
|
||||
)
|
||||
return listOf(declaration, generatedFunction)
|
||||
}
|
||||
@@ -611,7 +592,7 @@ private class IdlFileConverter(
|
||||
listOf(),
|
||||
null
|
||||
)
|
||||
},
|
||||
} + jsAnyHeritageModel,
|
||||
comment = SimpleCommentEntity(
|
||||
"please, don't implement this interface!"
|
||||
),
|
||||
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.tools.dukat.wasm
|
||||
|
||||
import org.jetbrains.dukat.astCommon.IdentifierEntity
|
||||
import org.jetbrains.dukat.astCommon.NameEntity
|
||||
import org.jetbrains.dukat.astModel.*
|
||||
import org.jetbrains.dukat.astModel.modifiers.VisibilityModifierModel
|
||||
import org.jetbrains.dukat.commonLowerings.AddExplicitGettersAndSetters
|
||||
import org.jetbrains.dukat.idlLowerings.*
|
||||
import org.jetbrains.dukat.idlParser.parseIDL
|
||||
import org.jetbrains.dukat.idlReferenceResolver.DirectoryReferencesResolver
|
||||
import org.jetbrains.dukat.model.commonLowerings.*
|
||||
import org.jetbrains.dukat.ownerContext.NodeOwner
|
||||
|
||||
fun translateIdlToSourceSet(fileName: String): SourceSetModel {
|
||||
val translationContext = TranslationContext()
|
||||
return parseIDL(fileName, DirectoryReferencesResolver())
|
||||
.resolvePartials()
|
||||
.addConstructors()
|
||||
.resolveTypedefs()
|
||||
.specifyEventHandlerTypes()
|
||||
.specifyDefaultValues()
|
||||
.resolveImplementsStatements()
|
||||
.resolveMixins()
|
||||
.addItemArrayLike()
|
||||
.resolveTypes()
|
||||
.markAbstractOrOpen()
|
||||
.addMissingMembers()
|
||||
.addOverloadsForCallbacks()
|
||||
.convertToWasmModel()
|
||||
.lower(
|
||||
ModelContextAwareLowering(translationContext),
|
||||
LowerOverrides(translationContext),
|
||||
EscapeIdentificators(),
|
||||
AddExplicitGettersAndSetters(),
|
||||
)
|
||||
.lower(ReplaceDynamics()) // Wasm-specific
|
||||
.addKDocs()
|
||||
.relocateDeclarations()
|
||||
.resolveTopLevelVisibility(alwaysPublic())
|
||||
.addImportsForUsedPackages()
|
||||
.omitStdLib()
|
||||
.lower(WasmPostProcessingHacks())
|
||||
}
|
||||
|
||||
class WasmPostProcessingHacks : TopLevelModelLowering {
|
||||
private fun fineItemMethodThatOverridersItemArrayLikeOrNull(klass: ClassLikeModel): MethodModel? {
|
||||
if (klass.parentEntities.none { it.value.value == IdentifierEntity("ItemArrayLike") })
|
||||
return null
|
||||
|
||||
return klass.members.filterIsInstance<MethodModel>().find { member ->
|
||||
member.name == IdentifierEntity("item") &&
|
||||
(member.parameters.firstOrNull()?.type as? TypeValueModel)?.value == IdentifierEntity("Int")
|
||||
}
|
||||
}
|
||||
|
||||
override fun lowerClassLikeModel(ownerContext: NodeOwner<ClassLikeModel>, parentModule: ModuleModel): ClassLikeModel {
|
||||
val klass: ClassLikeModel = super.lowerClassLikeModel(ownerContext, parentModule)
|
||||
val itemMethodThatOverridesAny: MethodModel = fineItemMethodThatOverridersItemArrayLikeOrNull(klass)
|
||||
?: return klass
|
||||
|
||||
fun translateMember(member: MemberModel): MemberModel {
|
||||
if (member !== itemMethodThatOverridesAny) return member
|
||||
|
||||
val newTypeIdentifier = when ((member.type as? TypeValueModel)?.value) {
|
||||
IdentifierEntity("String") -> IdentifierEntity("JsString")
|
||||
else -> null
|
||||
}
|
||||
|
||||
val newType = if (newTypeIdentifier != null) {
|
||||
TypeValueModel(
|
||||
IdentifierEntity("JsString"),
|
||||
fqName = null,
|
||||
metaDescription = null,
|
||||
nullable = member.type.nullable,
|
||||
params = emptyList()
|
||||
)
|
||||
} else {
|
||||
member.type
|
||||
}
|
||||
|
||||
return member.copy(
|
||||
type = newType,
|
||||
override = listOf<NameEntity>(IdentifierEntity("item"))
|
||||
)
|
||||
}
|
||||
|
||||
return when(klass) {
|
||||
is ClassModel -> klass.copy(members = klass.members.map(::translateMember))
|
||||
is InterfaceModel -> klass.copy(members = klass.members.map(::translateMember))
|
||||
is ObjectModel -> klass.copy(members = klass.members.map(::translateMember))
|
||||
else -> error("Unknown ClassLikeModel: ${klass::class}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun alwaysPublic(): VisibilityModifierResolver = object : VisibilityModifierResolver {
|
||||
override fun resolve(): VisibilityModifierModel = VisibilityModifierModel.PUBLIC
|
||||
}
|
||||
Reference in New Issue
Block a user