[Wasm] IDL: Generate overloads for functions with union-typed arguments
This commit is contained in:
committed by
Space Team
parent
24656b1576
commit
2fd77d0925
@@ -243,13 +243,17 @@ public external interface WebGLRenderingContextBase : JsAny {
|
|||||||
fun useProgram(program: WebGLProgram?)
|
fun useProgram(program: WebGLProgram?)
|
||||||
fun validateProgram(program: WebGLProgram?)
|
fun validateProgram(program: WebGLProgram?)
|
||||||
fun vertexAttrib1f(index: Int, x: Float)
|
fun vertexAttrib1f(index: Int, x: Float)
|
||||||
fun vertexAttrib1fv(index: Int, values: JsAny?)
|
fun vertexAttrib1fv(index: Int, values: Float32Array)
|
||||||
|
fun vertexAttrib1fv(index: Int, values: JsArray<JsNumber>)
|
||||||
fun vertexAttrib2f(index: Int, x: Float, y: Float)
|
fun vertexAttrib2f(index: Int, x: Float, y: Float)
|
||||||
fun vertexAttrib2fv(index: Int, values: JsAny?)
|
fun vertexAttrib2fv(index: Int, values: Float32Array)
|
||||||
|
fun vertexAttrib2fv(index: Int, values: JsArray<JsNumber>)
|
||||||
fun vertexAttrib3f(index: Int, x: Float, y: Float, z: Float)
|
fun vertexAttrib3f(index: Int, x: Float, y: Float, z: Float)
|
||||||
fun vertexAttrib3fv(index: Int, values: JsAny?)
|
fun vertexAttrib3fv(index: Int, values: Float32Array)
|
||||||
|
fun vertexAttrib3fv(index: Int, values: JsArray<JsNumber>)
|
||||||
fun vertexAttrib4f(index: Int, x: Float, y: Float, z: Float, w: Float)
|
fun vertexAttrib4f(index: Int, x: Float, y: Float, z: Float, w: Float)
|
||||||
fun vertexAttrib4fv(index: Int, values: JsAny?)
|
fun vertexAttrib4fv(index: Int, values: Float32Array)
|
||||||
|
fun vertexAttrib4fv(index: Int, values: JsArray<JsNumber>)
|
||||||
fun vertexAttribPointer(index: Int, size: Int, type: Int, normalized: Boolean, stride: Int, offset: Int)
|
fun vertexAttribPointer(index: Int, size: Int, type: Int, normalized: Boolean, stride: Int, offset: Int)
|
||||||
fun viewport(x: Int, y: Int, width: Int, height: Int)
|
fun viewport(x: Int, y: Int, width: Int, height: Int)
|
||||||
|
|
||||||
|
|||||||
@@ -343,10 +343,18 @@ 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
|
* Exposes the JavaScript [EventTarget](https://developer.mozilla.org/en/docs/Web/API/EventTarget) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external abstract class EventTarget : JsAny {
|
public external abstract class EventTarget : JsAny {
|
||||||
fun addEventListener(type: String, callback: EventListener?, options: JsAny? = definedExternally)
|
fun addEventListener(type: String, callback: EventListener?, options: AddEventListenerOptions)
|
||||||
fun addEventListener(type: String, callback: ((Event) -> Unit)?, options: JsAny? = definedExternally)
|
fun addEventListener(type: String, callback: ((Event) -> Unit)?, options: AddEventListenerOptions)
|
||||||
fun removeEventListener(type: String, callback: EventListener?, options: JsAny? = definedExternally)
|
fun addEventListener(type: String, callback: EventListener?, options: Boolean)
|
||||||
fun removeEventListener(type: String, callback: ((Event) -> Unit)?, options: JsAny? = definedExternally)
|
fun addEventListener(type: String, callback: ((Event) -> Unit)?, options: Boolean)
|
||||||
|
fun addEventListener(type: String, callback: EventListener?)
|
||||||
|
fun addEventListener(type: String, callback: ((Event) -> Unit)?)
|
||||||
|
fun removeEventListener(type: String, callback: EventListener?, options: EventListenerOptions)
|
||||||
|
fun removeEventListener(type: String, callback: ((Event) -> Unit)?, options: EventListenerOptions)
|
||||||
|
fun removeEventListener(type: String, callback: EventListener?, options: Boolean)
|
||||||
|
fun removeEventListener(type: String, callback: ((Event) -> Unit)?, options: Boolean)
|
||||||
|
fun removeEventListener(type: String, callback: EventListener?)
|
||||||
|
fun removeEventListener(type: String, callback: ((Event) -> Unit)?)
|
||||||
fun dispatchEvent(event: Event): Boolean
|
fun dispatchEvent(event: Event): Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ public external abstract class RadioNodeList : NodeList, UnionElementOrRadioNode
|
|||||||
public external abstract class HTMLOptionsCollection : HTMLCollection, JsAny {
|
public external abstract class HTMLOptionsCollection : HTMLCollection, JsAny {
|
||||||
override var length: Int
|
override var length: Int
|
||||||
open var selectedIndex: Int
|
open var selectedIndex: Int
|
||||||
fun add(element: UnionHTMLOptGroupElementOrHTMLOptionElement, before: JsAny? = definedExternally)
|
fun add(element: UnionHTMLOptGroupElementOrHTMLOptionElement, before: HTMLElement)
|
||||||
|
fun add(element: UnionHTMLOptGroupElementOrHTMLOptionElement, before: Int)
|
||||||
|
fun add(element: UnionHTMLOptGroupElementOrHTMLOptionElement)
|
||||||
fun remove(index: Int)
|
fun remove(index: Int)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2034,7 +2036,9 @@ public external abstract class HTMLSelectElement : HTMLElement, ItemArrayLike<El
|
|||||||
open val validationMessage: String
|
open val validationMessage: String
|
||||||
open val labels: NodeList
|
open val labels: NodeList
|
||||||
fun namedItem(name: String): HTMLOptionElement?
|
fun namedItem(name: String): HTMLOptionElement?
|
||||||
fun add(element: UnionHTMLOptGroupElementOrHTMLOptionElement, before: JsAny? = definedExternally)
|
fun add(element: UnionHTMLOptGroupElementOrHTMLOptionElement, before: HTMLElement)
|
||||||
|
fun add(element: UnionHTMLOptGroupElementOrHTMLOptionElement, before: Int)
|
||||||
|
fun add(element: UnionHTMLOptGroupElementOrHTMLOptionElement)
|
||||||
fun remove(index: Int)
|
fun remove(index: Int)
|
||||||
fun checkValidity(): Boolean
|
fun checkValidity(): Boolean
|
||||||
fun reportValidity(): Boolean
|
fun reportValidity(): Boolean
|
||||||
@@ -2771,8 +2775,8 @@ public external interface CanvasImageSmoothing : JsAny {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public external interface CanvasFillStrokeStyles : JsAny {
|
public external interface CanvasFillStrokeStyles : JsAny {
|
||||||
var strokeStyle: JsAny?
|
var strokeStyle: JsAny? /* String|CanvasGradient|CanvasPattern */
|
||||||
var fillStyle: JsAny?
|
var fillStyle: JsAny? /* String|CanvasGradient|CanvasPattern */
|
||||||
fun createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double): CanvasGradient
|
fun createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double): CanvasGradient
|
||||||
fun createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double): CanvasGradient
|
fun createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double): CanvasGradient
|
||||||
fun createPattern(image: CanvasImageSource, repetition: String): CanvasPattern?
|
fun createPattern(image: CanvasImageSource, repetition: String): CanvasPattern?
|
||||||
@@ -3433,7 +3437,7 @@ public external interface GlobalEventHandlers : JsAny {
|
|||||||
var onended: ((Event) -> Unit)?
|
var onended: ((Event) -> Unit)?
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var onerror: ((JsAny?, String, Int, Int, JsAny?) -> JsAny?)?
|
var onerror: ((JsAny? /* Event|String */, String, Int, Int, JsAny?) -> JsAny?)?
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var onfocus: ((FocusEvent) -> Unit)?
|
var onfocus: ((FocusEvent) -> Unit)?
|
||||||
@@ -3653,13 +3657,16 @@ public external interface WindowOrWorkerGlobalScope : JsAny {
|
|||||||
val caches: CacheStorage
|
val caches: CacheStorage
|
||||||
fun btoa(data: String): String
|
fun btoa(data: String): String
|
||||||
fun atob(data: String): String
|
fun atob(data: String): String
|
||||||
fun setTimeout(handler: JsAny?, timeout: Int = definedExternally, vararg arguments: JsAny?): Int
|
fun setTimeout(handler: String, timeout: Int = definedExternally, vararg arguments: JsAny?): Int
|
||||||
|
fun setTimeout(handler: () -> JsAny?, timeout: Int = definedExternally, vararg arguments: JsAny?): Int
|
||||||
fun clearTimeout(handle: Int = definedExternally)
|
fun clearTimeout(handle: Int = definedExternally)
|
||||||
fun setInterval(handler: JsAny?, timeout: Int = definedExternally, vararg arguments: JsAny?): Int
|
fun setInterval(handler: String, timeout: Int = definedExternally, vararg arguments: JsAny?): Int
|
||||||
|
fun setInterval(handler: () -> JsAny?, timeout: Int = definedExternally, vararg arguments: JsAny?): Int
|
||||||
fun clearInterval(handle: Int = definedExternally)
|
fun clearInterval(handle: Int = definedExternally)
|
||||||
fun createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions = definedExternally): Promise<ImageBitmap>
|
fun createImageBitmap(image: ImageBitmapSource, options: ImageBitmapOptions = definedExternally): Promise<ImageBitmap>
|
||||||
fun createImageBitmap(image: ImageBitmapSource, sx: Int, sy: Int, sw: Int, sh: Int, options: ImageBitmapOptions = definedExternally): Promise<ImageBitmap>
|
fun createImageBitmap(image: ImageBitmapSource, sx: Int, sy: Int, sw: Int, sh: Int, options: ImageBitmapOptions = definedExternally): Promise<ImageBitmap>
|
||||||
fun fetch(input: JsAny?, init: RequestInit = definedExternally): Promise<Response>
|
fun fetch(input: Request, init: RequestInit = definedExternally): Promise<Response>
|
||||||
|
fun fetch(input: String, init: RequestInit = definedExternally): Promise<Response>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3672,7 +3679,8 @@ public external abstract class Navigator : NavigatorID, NavigatorLanguage, Navig
|
|||||||
open val serviceWorker: ServiceWorkerContainer
|
open val serviceWorker: ServiceWorkerContainer
|
||||||
fun requestMediaKeySystemAccess(keySystem: String, supportedConfigurations: JsArray<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>
|
fun requestMediaKeySystemAccess(keySystem: String, supportedConfigurations: JsArray<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>
|
||||||
fun getUserMedia(constraints: MediaStreamConstraints, successCallback: (MediaStream) -> Unit, errorCallback: (JsAny) -> Unit)
|
fun getUserMedia(constraints: MediaStreamConstraints, successCallback: (MediaStream) -> Unit, errorCallback: (JsAny) -> Unit)
|
||||||
fun vibrate(pattern: JsAny?): Boolean
|
fun vibrate(pattern: Int): Boolean
|
||||||
|
fun vibrate(pattern: JsArray<JsNumber>): Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3894,7 +3902,7 @@ public fun EventSourceInit(withCredentials: Boolean? = false): EventSourceInit {
|
|||||||
/**
|
/**
|
||||||
* Exposes the JavaScript [WebSocket](https://developer.mozilla.org/en/docs/Web/API/WebSocket) to Kotlin
|
* Exposes the JavaScript [WebSocket](https://developer.mozilla.org/en/docs/Web/API/WebSocket) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external open class WebSocket(url: String, protocols: JsAny? = definedExternally) : EventTarget, JsAny {
|
public external open class WebSocket(url: String, protocols: JsAny? /* String|JsArray<JsString> */ = definedExternally) : EventTarget, JsAny {
|
||||||
open val url: String
|
open val url: String
|
||||||
open val readyState: Short
|
open val readyState: Short
|
||||||
open val bufferedAmount: JsNumber
|
open val bufferedAmount: JsNumber
|
||||||
@@ -3985,7 +3993,7 @@ public external abstract class WorkerGlobalScope : EventTarget, WindowOrWorkerGl
|
|||||||
open val self: WorkerGlobalScope
|
open val self: WorkerGlobalScope
|
||||||
open val location: WorkerLocation
|
open val location: WorkerLocation
|
||||||
open val navigator: WorkerNavigator
|
open val navigator: WorkerNavigator
|
||||||
open var onerror: ((JsAny?, String, Int, Int, JsAny?) -> JsAny?)?
|
open var onerror: ((JsAny? /* Event|String */, String, Int, Int, JsAny?) -> JsAny?)?
|
||||||
open var onlanguagechange: ((Event) -> Unit)?
|
open var onlanguagechange: ((Event) -> Unit)?
|
||||||
open var onoffline: ((Event) -> Unit)?
|
open var onoffline: ((Event) -> Unit)?
|
||||||
open var ononline: ((Event) -> Unit)?
|
open var ononline: ((Event) -> Unit)?
|
||||||
@@ -4439,8 +4447,10 @@ public external interface ParentNode : JsAny {
|
|||||||
val lastElementChild: Element?
|
val lastElementChild: Element?
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
val childElementCount: Int
|
val childElementCount: Int
|
||||||
fun prepend(vararg nodes: JsAny?)
|
fun prepend(vararg nodes: Node)
|
||||||
fun append(vararg nodes: JsAny?)
|
fun prepend(vararg nodes: String)
|
||||||
|
fun append(vararg nodes: Node)
|
||||||
|
fun append(vararg nodes: String)
|
||||||
fun querySelector(selectors: String): Element?
|
fun querySelector(selectors: String): Element?
|
||||||
fun querySelectorAll(selectors: String): NodeList
|
fun querySelectorAll(selectors: String): NodeList
|
||||||
}
|
}
|
||||||
@@ -4459,9 +4469,12 @@ public external interface NonDocumentTypeChildNode : JsAny {
|
|||||||
* Exposes the JavaScript [ChildNode](https://developer.mozilla.org/en/docs/Web/API/ChildNode) to Kotlin
|
* Exposes the JavaScript [ChildNode](https://developer.mozilla.org/en/docs/Web/API/ChildNode) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external interface ChildNode : JsAny {
|
public external interface ChildNode : JsAny {
|
||||||
fun before(vararg nodes: JsAny?)
|
fun before(vararg nodes: Node)
|
||||||
fun after(vararg nodes: JsAny?)
|
fun before(vararg nodes: String)
|
||||||
fun replaceWith(vararg nodes: JsAny?)
|
fun after(vararg nodes: Node)
|
||||||
|
fun after(vararg nodes: String)
|
||||||
|
fun replaceWith(vararg nodes: Node)
|
||||||
|
fun replaceWith(vararg nodes: String)
|
||||||
fun remove()
|
fun remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4695,7 +4708,7 @@ public external open class Document : Node, GlobalEventHandlers, DocumentAndElem
|
|||||||
override var ondurationchange: ((Event) -> Unit)?
|
override var ondurationchange: ((Event) -> Unit)?
|
||||||
override var onemptied: ((Event) -> Unit)?
|
override var onemptied: ((Event) -> Unit)?
|
||||||
override var onended: ((Event) -> Unit)?
|
override var onended: ((Event) -> Unit)?
|
||||||
override var onerror: ((JsAny?, String, Int, Int, JsAny?) -> JsAny?)?
|
override var onerror: ((JsAny? /* Event|String */, String, Int, Int, JsAny?) -> JsAny?)?
|
||||||
override var onfocus: ((FocusEvent) -> Unit)?
|
override var onfocus: ((FocusEvent) -> Unit)?
|
||||||
override var oninput: ((InputEvent) -> Unit)?
|
override var oninput: ((InputEvent) -> Unit)?
|
||||||
override var oninvalid: ((Event) -> Unit)?
|
override var oninvalid: ((Event) -> Unit)?
|
||||||
@@ -4795,14 +4808,22 @@ public external open class Document : Node, GlobalEventHandlers, DocumentAndElem
|
|||||||
fun createTouchList(vararg touches: Touch): TouchList
|
fun createTouchList(vararg touches: Touch): TouchList
|
||||||
fun exitFullscreen(): Promise<Nothing?>
|
fun exitFullscreen(): Promise<Nothing?>
|
||||||
override fun getElementById(elementId: String): Element?
|
override fun getElementById(elementId: String): Element?
|
||||||
override fun prepend(vararg nodes: JsAny?)
|
override fun prepend(vararg nodes: Node)
|
||||||
override fun append(vararg nodes: JsAny?)
|
override fun prepend(vararg nodes: String)
|
||||||
|
override fun append(vararg nodes: Node)
|
||||||
|
override fun append(vararg nodes: String)
|
||||||
override fun querySelector(selectors: String): Element?
|
override fun querySelector(selectors: String): Element?
|
||||||
override fun querySelectorAll(selectors: String): NodeList
|
override fun querySelectorAll(selectors: String): NodeList
|
||||||
override fun getBoxQuads(options: BoxQuadOptions /* = definedExternally */): JsArray<DOMQuad>
|
override fun getBoxQuads(options: BoxQuadOptions /* = definedExternally */): JsArray<DOMQuad>
|
||||||
override fun convertQuadFromNode(quad: JsAny?, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
override fun convertQuadFromNode(quad: JsAny?, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun convertRectFromNode(rect: DOMRectReadOnly, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
override fun convertQuadFromNode(quad: JsAny?, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun convertPointFromNode(point: DOMPointInit, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
override fun convertQuadFromNode(quad: JsAny?, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val ELEMENT_NODE: Short
|
val ELEMENT_NODE: Short
|
||||||
@@ -4915,8 +4936,10 @@ public external open class DocumentFragment : Node, NonElementParentNode, Parent
|
|||||||
override val lastElementChild: Element?
|
override val lastElementChild: Element?
|
||||||
override val childElementCount: Int
|
override val childElementCount: Int
|
||||||
override fun getElementById(elementId: String): Element?
|
override fun getElementById(elementId: String): Element?
|
||||||
override fun prepend(vararg nodes: JsAny?)
|
override fun prepend(vararg nodes: Node)
|
||||||
override fun append(vararg nodes: JsAny?)
|
override fun prepend(vararg nodes: String)
|
||||||
|
override fun append(vararg nodes: Node)
|
||||||
|
override fun append(vararg nodes: String)
|
||||||
override fun querySelector(selectors: String): Element?
|
override fun querySelector(selectors: String): Element?
|
||||||
override fun querySelectorAll(selectors: String): NodeList
|
override fun querySelectorAll(selectors: String): NodeList
|
||||||
|
|
||||||
@@ -5023,7 +5046,8 @@ public external abstract class Element : Node, ParentNode, NonDocumentTypeChildN
|
|||||||
fun getClientRects(): JsArray<DOMRect>
|
fun getClientRects(): JsArray<DOMRect>
|
||||||
fun getBoundingClientRect(): DOMRect
|
fun getBoundingClientRect(): DOMRect
|
||||||
fun scrollIntoView()
|
fun scrollIntoView()
|
||||||
fun scrollIntoView(arg: JsAny?)
|
fun scrollIntoView(arg: Boolean)
|
||||||
|
fun scrollIntoView(arg: JsAny)
|
||||||
fun scroll(options: ScrollToOptions = definedExternally)
|
fun scroll(options: ScrollToOptions = definedExternally)
|
||||||
fun scroll(x: Double, y: Double)
|
fun scroll(x: Double, y: Double)
|
||||||
fun scrollTo(options: ScrollToOptions = definedExternally)
|
fun scrollTo(options: ScrollToOptions = definedExternally)
|
||||||
@@ -5166,12 +5190,21 @@ public external open class Text(data: String = definedExternally) : CharacterDat
|
|||||||
override val nextElementSibling: Element?
|
override val nextElementSibling: Element?
|
||||||
fun splitText(offset: Int): Text
|
fun splitText(offset: Int): Text
|
||||||
override fun getBoxQuads(options: BoxQuadOptions /* = definedExternally */): JsArray<DOMQuad>
|
override fun getBoxQuads(options: BoxQuadOptions /* = definedExternally */): JsArray<DOMQuad>
|
||||||
override fun convertQuadFromNode(quad: JsAny?, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
override fun convertQuadFromNode(quad: JsAny?, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun convertRectFromNode(rect: DOMRectReadOnly, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
override fun convertQuadFromNode(quad: JsAny?, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun convertPointFromNode(point: DOMPointInit, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
override fun convertQuadFromNode(quad: JsAny?, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun before(vararg nodes: JsAny?)
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun after(vararg nodes: JsAny?)
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun replaceWith(vararg nodes: JsAny?)
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun before(vararg nodes: Node)
|
||||||
|
override fun before(vararg nodes: String)
|
||||||
|
override fun after(vararg nodes: Node)
|
||||||
|
override fun after(vararg nodes: String)
|
||||||
|
override fun replaceWith(vararg nodes: Node)
|
||||||
|
override fun replaceWith(vararg nodes: String)
|
||||||
override fun remove()
|
override fun remove()
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@@ -5256,9 +5289,12 @@ public external abstract class ProcessingInstruction : CharacterData, LinkStyle,
|
|||||||
public external open class Comment(data: String = definedExternally) : CharacterData, JsAny {
|
public external open class Comment(data: String = definedExternally) : CharacterData, JsAny {
|
||||||
override val previousElementSibling: Element?
|
override val previousElementSibling: Element?
|
||||||
override val nextElementSibling: Element?
|
override val nextElementSibling: Element?
|
||||||
override fun before(vararg nodes: JsAny?)
|
override fun before(vararg nodes: Node)
|
||||||
override fun after(vararg nodes: JsAny?)
|
override fun before(vararg nodes: String)
|
||||||
override fun replaceWith(vararg nodes: JsAny?)
|
override fun after(vararg nodes: Node)
|
||||||
|
override fun after(vararg nodes: String)
|
||||||
|
override fun replaceWith(vararg nodes: Node)
|
||||||
|
override fun replaceWith(vararg nodes: String)
|
||||||
override fun remove()
|
override fun remove()
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@@ -5703,13 +5739,13 @@ public external interface BoxQuadOptions : JsAny {
|
|||||||
var box: CSSBoxType? /* = CSSBoxType.BORDER */
|
var box: CSSBoxType? /* = CSSBoxType.BORDER */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var relativeTo: JsAny?
|
var relativeTo: JsAny? /* Text|Element|CSSPseudoElement|Document */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER")
|
||||||
public fun BoxQuadOptions(box: CSSBoxType? = CSSBoxType.BORDER, relativeTo: JsAny? = undefined): BoxQuadOptions { js("return { box, relativeTo };") }
|
public fun BoxQuadOptions(box: CSSBoxType? = CSSBoxType.BORDER, relativeTo: JsAny? /* Text|Element|CSSPseudoElement|Document */ = undefined): BoxQuadOptions { js("return { box, relativeTo };") }
|
||||||
|
|
||||||
public external interface ConvertCoordinateOptions : JsAny {
|
public external interface ConvertCoordinateOptions : JsAny {
|
||||||
var fromBox: CSSBoxType? /* = CSSBoxType.BORDER */
|
var fromBox: CSSBoxType? /* = CSSBoxType.BORDER */
|
||||||
@@ -5728,9 +5764,15 @@ public fun ConvertCoordinateOptions(fromBox: CSSBoxType? = CSSBoxType.BORDER, to
|
|||||||
*/
|
*/
|
||||||
public external interface GeometryUtils : JsAny {
|
public external interface GeometryUtils : JsAny {
|
||||||
fun getBoxQuads(options: BoxQuadOptions = definedExternally): JsArray<DOMQuad>
|
fun getBoxQuads(options: BoxQuadOptions = definedExternally): JsArray<DOMQuad>
|
||||||
fun convertQuadFromNode(quad: JsAny?, from: JsAny?, options: ConvertCoordinateOptions = definedExternally): DOMQuad
|
fun convertQuadFromNode(quad: JsAny?, from: Text, options: ConvertCoordinateOptions = definedExternally): DOMQuad
|
||||||
fun convertRectFromNode(rect: DOMRectReadOnly, from: JsAny?, options: ConvertCoordinateOptions = definedExternally): DOMQuad
|
fun convertQuadFromNode(quad: JsAny?, from: Element, options: ConvertCoordinateOptions = definedExternally): DOMQuad
|
||||||
fun convertPointFromNode(point: DOMPointInit, from: JsAny?, options: ConvertCoordinateOptions = definedExternally): DOMPoint
|
fun convertQuadFromNode(quad: JsAny?, from: Document, options: ConvertCoordinateOptions = definedExternally): DOMQuad
|
||||||
|
fun convertRectFromNode(rect: DOMRectReadOnly, from: Text, options: ConvertCoordinateOptions = definedExternally): DOMQuad
|
||||||
|
fun convertRectFromNode(rect: DOMRectReadOnly, from: Element, options: ConvertCoordinateOptions = definedExternally): DOMQuad
|
||||||
|
fun convertRectFromNode(rect: DOMRectReadOnly, from: Document, options: ConvertCoordinateOptions = definedExternally): DOMQuad
|
||||||
|
fun convertPointFromNode(point: DOMPointInit, from: Text, options: ConvertCoordinateOptions = definedExternally): DOMPoint
|
||||||
|
fun convertPointFromNode(point: DOMPointInit, from: Element, options: ConvertCoordinateOptions = definedExternally): DOMPoint
|
||||||
|
fun convertPointFromNode(point: DOMPointInit, from: Document, options: ConvertCoordinateOptions = definedExternally): DOMPoint
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -5800,7 +5842,7 @@ public external open class Image(width: Int = definedExternally, height: Int = d
|
|||||||
override var ondurationchange: ((Event) -> Unit)?
|
override var ondurationchange: ((Event) -> Unit)?
|
||||||
override var onemptied: ((Event) -> Unit)?
|
override var onemptied: ((Event) -> Unit)?
|
||||||
override var onended: ((Event) -> Unit)?
|
override var onended: ((Event) -> Unit)?
|
||||||
override var onerror: ((JsAny?, String, Int, Int, JsAny?) -> JsAny?)?
|
override var onerror: ((JsAny? /* Event|String */, String, Int, Int, JsAny?) -> JsAny?)?
|
||||||
override var onfocus: ((FocusEvent) -> Unit)?
|
override var onfocus: ((FocusEvent) -> Unit)?
|
||||||
override var oninput: ((InputEvent) -> Unit)?
|
override var oninput: ((InputEvent) -> Unit)?
|
||||||
override var oninvalid: ((Event) -> Unit)?
|
override var oninvalid: ((Event) -> Unit)?
|
||||||
@@ -5862,18 +5904,29 @@ public external open class Image(width: Int = definedExternally, height: Int = d
|
|||||||
override val previousElementSibling: Element?
|
override val previousElementSibling: Element?
|
||||||
override val nextElementSibling: Element?
|
override val nextElementSibling: Element?
|
||||||
override val assignedSlot: HTMLSlotElement?
|
override val assignedSlot: HTMLSlotElement?
|
||||||
override fun prepend(vararg nodes: JsAny?)
|
override fun prepend(vararg nodes: Node)
|
||||||
override fun append(vararg nodes: JsAny?)
|
override fun prepend(vararg nodes: String)
|
||||||
|
override fun append(vararg nodes: Node)
|
||||||
|
override fun append(vararg nodes: String)
|
||||||
override fun querySelector(selectors: String): Element?
|
override fun querySelector(selectors: String): Element?
|
||||||
override fun querySelectorAll(selectors: String): NodeList
|
override fun querySelectorAll(selectors: String): NodeList
|
||||||
override fun before(vararg nodes: JsAny?)
|
override fun before(vararg nodes: Node)
|
||||||
override fun after(vararg nodes: JsAny?)
|
override fun before(vararg nodes: String)
|
||||||
override fun replaceWith(vararg nodes: JsAny?)
|
override fun after(vararg nodes: Node)
|
||||||
|
override fun after(vararg nodes: String)
|
||||||
|
override fun replaceWith(vararg nodes: Node)
|
||||||
|
override fun replaceWith(vararg nodes: String)
|
||||||
override fun remove()
|
override fun remove()
|
||||||
override fun getBoxQuads(options: BoxQuadOptions /* = definedExternally */): JsArray<DOMQuad>
|
override fun getBoxQuads(options: BoxQuadOptions /* = definedExternally */): JsArray<DOMQuad>
|
||||||
override fun convertQuadFromNode(quad: JsAny?, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
override fun convertQuadFromNode(quad: JsAny?, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun convertRectFromNode(rect: DOMRectReadOnly, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
override fun convertQuadFromNode(quad: JsAny?, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun convertPointFromNode(point: DOMPointInit, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
override fun convertQuadFromNode(quad: JsAny?, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val ELEMENT_NODE: Short
|
val ELEMENT_NODE: Short
|
||||||
@@ -5920,7 +5973,7 @@ public external open class Audio(src: String = definedExternally) : HTMLAudioEle
|
|||||||
override var ondurationchange: ((Event) -> Unit)?
|
override var ondurationchange: ((Event) -> Unit)?
|
||||||
override var onemptied: ((Event) -> Unit)?
|
override var onemptied: ((Event) -> Unit)?
|
||||||
override var onended: ((Event) -> Unit)?
|
override var onended: ((Event) -> Unit)?
|
||||||
override var onerror: ((JsAny?, String, Int, Int, JsAny?) -> JsAny?)?
|
override var onerror: ((JsAny? /* Event|String */, String, Int, Int, JsAny?) -> JsAny?)?
|
||||||
override var onfocus: ((FocusEvent) -> Unit)?
|
override var onfocus: ((FocusEvent) -> Unit)?
|
||||||
override var oninput: ((InputEvent) -> Unit)?
|
override var oninput: ((InputEvent) -> Unit)?
|
||||||
override var oninvalid: ((Event) -> Unit)?
|
override var oninvalid: ((Event) -> Unit)?
|
||||||
@@ -5982,18 +6035,29 @@ public external open class Audio(src: String = definedExternally) : HTMLAudioEle
|
|||||||
override val previousElementSibling: Element?
|
override val previousElementSibling: Element?
|
||||||
override val nextElementSibling: Element?
|
override val nextElementSibling: Element?
|
||||||
override val assignedSlot: HTMLSlotElement?
|
override val assignedSlot: HTMLSlotElement?
|
||||||
override fun prepend(vararg nodes: JsAny?)
|
override fun prepend(vararg nodes: Node)
|
||||||
override fun append(vararg nodes: JsAny?)
|
override fun prepend(vararg nodes: String)
|
||||||
|
override fun append(vararg nodes: Node)
|
||||||
|
override fun append(vararg nodes: String)
|
||||||
override fun querySelector(selectors: String): Element?
|
override fun querySelector(selectors: String): Element?
|
||||||
override fun querySelectorAll(selectors: String): NodeList
|
override fun querySelectorAll(selectors: String): NodeList
|
||||||
override fun before(vararg nodes: JsAny?)
|
override fun before(vararg nodes: Node)
|
||||||
override fun after(vararg nodes: JsAny?)
|
override fun before(vararg nodes: String)
|
||||||
override fun replaceWith(vararg nodes: JsAny?)
|
override fun after(vararg nodes: Node)
|
||||||
|
override fun after(vararg nodes: String)
|
||||||
|
override fun replaceWith(vararg nodes: Node)
|
||||||
|
override fun replaceWith(vararg nodes: String)
|
||||||
override fun remove()
|
override fun remove()
|
||||||
override fun getBoxQuads(options: BoxQuadOptions /* = definedExternally */): JsArray<DOMQuad>
|
override fun getBoxQuads(options: BoxQuadOptions /* = definedExternally */): JsArray<DOMQuad>
|
||||||
override fun convertQuadFromNode(quad: JsAny?, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
override fun convertQuadFromNode(quad: JsAny?, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun convertRectFromNode(rect: DOMRectReadOnly, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
override fun convertQuadFromNode(quad: JsAny?, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun convertPointFromNode(point: DOMPointInit, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
override fun convertQuadFromNode(quad: JsAny?, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val NETWORK_EMPTY: Short
|
val NETWORK_EMPTY: Short
|
||||||
@@ -6052,7 +6116,7 @@ public external open class Option(text: String = definedExternally, value: Strin
|
|||||||
override var ondurationchange: ((Event) -> Unit)?
|
override var ondurationchange: ((Event) -> Unit)?
|
||||||
override var onemptied: ((Event) -> Unit)?
|
override var onemptied: ((Event) -> Unit)?
|
||||||
override var onended: ((Event) -> Unit)?
|
override var onended: ((Event) -> Unit)?
|
||||||
override var onerror: ((JsAny?, String, Int, Int, JsAny?) -> JsAny?)?
|
override var onerror: ((JsAny? /* Event|String */, String, Int, Int, JsAny?) -> JsAny?)?
|
||||||
override var onfocus: ((FocusEvent) -> Unit)?
|
override var onfocus: ((FocusEvent) -> Unit)?
|
||||||
override var oninput: ((InputEvent) -> Unit)?
|
override var oninput: ((InputEvent) -> Unit)?
|
||||||
override var oninvalid: ((Event) -> Unit)?
|
override var oninvalid: ((Event) -> Unit)?
|
||||||
@@ -6114,18 +6178,29 @@ public external open class Option(text: String = definedExternally, value: Strin
|
|||||||
override val previousElementSibling: Element?
|
override val previousElementSibling: Element?
|
||||||
override val nextElementSibling: Element?
|
override val nextElementSibling: Element?
|
||||||
override val assignedSlot: HTMLSlotElement?
|
override val assignedSlot: HTMLSlotElement?
|
||||||
override fun prepend(vararg nodes: JsAny?)
|
override fun prepend(vararg nodes: Node)
|
||||||
override fun append(vararg nodes: JsAny?)
|
override fun prepend(vararg nodes: String)
|
||||||
|
override fun append(vararg nodes: Node)
|
||||||
|
override fun append(vararg nodes: String)
|
||||||
override fun querySelector(selectors: String): Element?
|
override fun querySelector(selectors: String): Element?
|
||||||
override fun querySelectorAll(selectors: String): NodeList
|
override fun querySelectorAll(selectors: String): NodeList
|
||||||
override fun before(vararg nodes: JsAny?)
|
override fun before(vararg nodes: Node)
|
||||||
override fun after(vararg nodes: JsAny?)
|
override fun before(vararg nodes: String)
|
||||||
override fun replaceWith(vararg nodes: JsAny?)
|
override fun after(vararg nodes: Node)
|
||||||
|
override fun after(vararg nodes: String)
|
||||||
|
override fun replaceWith(vararg nodes: Node)
|
||||||
|
override fun replaceWith(vararg nodes: String)
|
||||||
override fun remove()
|
override fun remove()
|
||||||
override fun getBoxQuads(options: BoxQuadOptions /* = definedExternally */): JsArray<DOMQuad>
|
override fun getBoxQuads(options: BoxQuadOptions /* = definedExternally */): JsArray<DOMQuad>
|
||||||
override fun convertQuadFromNode(quad: JsAny?, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
override fun convertQuadFromNode(quad: JsAny?, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun convertRectFromNode(rect: DOMRectReadOnly, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
override fun convertQuadFromNode(quad: JsAny?, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
override fun convertPointFromNode(point: DOMPointInit, from: JsAny?, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
override fun convertQuadFromNode(quad: JsAny?, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertRectFromNode(rect: DOMRectReadOnly, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMQuad
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Text, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Element, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
override fun convertPointFromNode(point: DOMPointInit, from: Document, options: ConvertCoordinateOptions /* = definedExternally */): DOMPoint
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val ELEMENT_NODE: Short
|
val ELEMENT_NODE: Short
|
||||||
|
|||||||
@@ -175,61 +175,61 @@ public external interface MediaTrackConstraints : MediaTrackConstraintSet, JsAny
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@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 fun MediaTrackConstraints(advanced: JsArray<MediaTrackConstraintSet>? = undefined, width: JsAny? /* Int|ConstrainULongRange */ = undefined, height: JsAny? /* Int|ConstrainULongRange */ = undefined, aspectRatio: JsAny? /* Double|ConstrainDoubleRange */ = undefined, frameRate: JsAny? /* Double|ConstrainDoubleRange */ = undefined, facingMode: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */ = undefined, resizeMode: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */ = undefined, volume: JsAny? /* Double|ConstrainDoubleRange */ = undefined, sampleRate: JsAny? /* Int|ConstrainULongRange */ = undefined, sampleSize: JsAny? /* Int|ConstrainULongRange */ = undefined, echoCancellation: JsAny? /* Boolean|ConstrainBooleanParameters */ = undefined, autoGainControl: JsAny? /* Boolean|ConstrainBooleanParameters */ = undefined, noiseSuppression: JsAny? /* Boolean|ConstrainBooleanParameters */ = undefined, latency: JsAny? /* Double|ConstrainDoubleRange */ = undefined, channelCount: JsAny? /* Int|ConstrainULongRange */ = undefined, deviceId: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */ = undefined, groupId: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */ = 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 : JsAny {
|
public external interface MediaTrackConstraintSet : JsAny {
|
||||||
var width: JsAny?
|
var width: JsAny? /* Int|ConstrainULongRange */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var height: JsAny?
|
var height: JsAny? /* Int|ConstrainULongRange */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var aspectRatio: JsAny?
|
var aspectRatio: JsAny? /* Double|ConstrainDoubleRange */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var frameRate: JsAny?
|
var frameRate: JsAny? /* Double|ConstrainDoubleRange */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var facingMode: JsAny?
|
var facingMode: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var resizeMode: JsAny?
|
var resizeMode: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var volume: JsAny?
|
var volume: JsAny? /* Double|ConstrainDoubleRange */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var sampleRate: JsAny?
|
var sampleRate: JsAny? /* Int|ConstrainULongRange */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var sampleSize: JsAny?
|
var sampleSize: JsAny? /* Int|ConstrainULongRange */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var echoCancellation: JsAny?
|
var echoCancellation: JsAny? /* Boolean|ConstrainBooleanParameters */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var autoGainControl: JsAny?
|
var autoGainControl: JsAny? /* Boolean|ConstrainBooleanParameters */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var noiseSuppression: JsAny?
|
var noiseSuppression: JsAny? /* Boolean|ConstrainBooleanParameters */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var latency: JsAny?
|
var latency: JsAny? /* Double|ConstrainDoubleRange */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var channelCount: JsAny?
|
var channelCount: JsAny? /* Int|ConstrainULongRange */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var deviceId: JsAny?
|
var deviceId: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var groupId: JsAny?
|
var groupId: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@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 };") }
|
public fun MediaTrackConstraintSet(width: JsAny? /* Int|ConstrainULongRange */ = undefined, height: JsAny? /* Int|ConstrainULongRange */ = undefined, aspectRatio: JsAny? /* Double|ConstrainDoubleRange */ = undefined, frameRate: JsAny? /* Double|ConstrainDoubleRange */ = undefined, facingMode: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */ = undefined, resizeMode: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */ = undefined, volume: JsAny? /* Double|ConstrainDoubleRange */ = undefined, sampleRate: JsAny? /* Int|ConstrainULongRange */ = undefined, sampleSize: JsAny? /* Int|ConstrainULongRange */ = undefined, echoCancellation: JsAny? /* Boolean|ConstrainBooleanParameters */ = undefined, autoGainControl: JsAny? /* Boolean|ConstrainBooleanParameters */ = undefined, noiseSuppression: JsAny? /* Boolean|ConstrainBooleanParameters */ = undefined, latency: JsAny? /* Double|ConstrainDoubleRange */ = undefined, channelCount: JsAny? /* Int|ConstrainULongRange */ = undefined, deviceId: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */ = undefined, groupId: JsAny? /* String|JsArray<JsString>|ConstrainDOMStringParameters */ = 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
|
* Exposes the JavaScript [MediaTrackSettings](https://developer.mozilla.org/en/docs/Web/API/MediaTrackSettings) to Kotlin
|
||||||
@@ -358,16 +358,16 @@ public external abstract class InputDeviceInfo : MediaDeviceInfo, JsAny {
|
|||||||
* Exposes the JavaScript [MediaStreamConstraints](https://developer.mozilla.org/en/docs/Web/API/MediaStreamConstraints) to Kotlin
|
* Exposes the JavaScript [MediaStreamConstraints](https://developer.mozilla.org/en/docs/Web/API/MediaStreamConstraints) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external interface MediaStreamConstraints : JsAny {
|
public external interface MediaStreamConstraints : JsAny {
|
||||||
var video: JsAny? /* = false */
|
var video: JsAny? /* Boolean|MediaTrackConstraints */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var audio: JsAny? /* = false */
|
var audio: JsAny? /* Boolean|MediaTrackConstraints */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER")
|
||||||
public fun MediaStreamConstraints(video: JsAny? = false.toJsBoolean(), audio: JsAny? = false.toJsBoolean()): MediaStreamConstraints { js("return { video, audio };") }
|
public fun MediaStreamConstraints(video: JsAny? /* Boolean|MediaTrackConstraints */ = false.toJsBoolean(), audio: JsAny? /* Boolean|MediaTrackConstraints */ = false.toJsBoolean()): MediaStreamConstraints { js("return { video, audio };") }
|
||||||
|
|
||||||
public external interface ConstrainablePattern : JsAny {
|
public external interface ConstrainablePattern : JsAny {
|
||||||
var onoverconstrained: ((Event) -> Unit)?
|
var onoverconstrained: ((Event) -> Unit)?
|
||||||
@@ -449,16 +449,16 @@ public fun ConstrainBooleanParameters(exact: Boolean? = undefined, ideal: Boolea
|
|||||||
* Exposes the JavaScript [ConstrainDOMStringParameters](https://developer.mozilla.org/en/docs/Web/API/ConstrainDOMStringParameters) to Kotlin
|
* Exposes the JavaScript [ConstrainDOMStringParameters](https://developer.mozilla.org/en/docs/Web/API/ConstrainDOMStringParameters) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external interface ConstrainDOMStringParameters : JsAny {
|
public external interface ConstrainDOMStringParameters : JsAny {
|
||||||
var exact: JsAny?
|
var exact: JsAny? /* String|JsArray<JsString> */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var ideal: JsAny?
|
var ideal: JsAny? /* String|JsArray<JsString> */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER")
|
||||||
public fun ConstrainDOMStringParameters(exact: JsAny? = undefined, ideal: JsAny? = undefined): ConstrainDOMStringParameters { js("return { exact, ideal };") }
|
public fun ConstrainDOMStringParameters(exact: JsAny? /* String|JsArray<JsString> */ = undefined, ideal: JsAny? /* String|JsArray<JsString> */ = undefined): ConstrainDOMStringParameters { js("return { exact, ideal };") }
|
||||||
|
|
||||||
public external interface Capabilities : JsAny
|
public external interface Capabilities : JsAny
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ 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
|
* Exposes the JavaScript [URLSearchParams](https://developer.mozilla.org/en/docs/Web/API/URLSearchParams) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external open class URLSearchParams(init: JsAny? = definedExternally) : JsAny {
|
public external open class URLSearchParams(init: JsAny? /* String|URLSearchParams */ = definedExternally) : JsAny {
|
||||||
fun append(name: String, value: String)
|
fun append(name: String, value: String)
|
||||||
fun delete(name: String)
|
fun delete(name: String)
|
||||||
fun get(name: String): String?
|
fun get(name: String): String?
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import org.w3c.xhr.*
|
|||||||
/**
|
/**
|
||||||
* Exposes the JavaScript [Headers](https://developer.mozilla.org/en/docs/Web/API/Headers) to Kotlin
|
* Exposes the JavaScript [Headers](https://developer.mozilla.org/en/docs/Web/API/Headers) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external open class Headers(init: JsAny? = definedExternally) : JsAny {
|
public external open class Headers(init: JsAny? /* Headers|JsArray<JsArray<JsString>>|OpenEndedDictionary<JsString> */ = definedExternally) : JsAny {
|
||||||
fun append(name: String, value: String)
|
fun append(name: String, value: String)
|
||||||
fun delete(name: String)
|
fun delete(name: String)
|
||||||
fun get(name: String): String?
|
fun get(name: String): String?
|
||||||
@@ -39,7 +39,7 @@ public external interface Body : JsAny {
|
|||||||
/**
|
/**
|
||||||
* Exposes the JavaScript [Request](https://developer.mozilla.org/en/docs/Web/API/Request) to Kotlin
|
* Exposes the JavaScript [Request](https://developer.mozilla.org/en/docs/Web/API/Request) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external open class Request(input: JsAny?, init: RequestInit = definedExternally) : Body, JsAny {
|
public external open class Request(input: JsAny? /* Request|String */, init: RequestInit = definedExternally) : Body, JsAny {
|
||||||
open val method: String
|
open val method: String
|
||||||
open val url: String
|
open val url: String
|
||||||
open val headers: Headers
|
open val headers: Headers
|
||||||
@@ -66,10 +66,10 @@ public external interface RequestInit : JsAny {
|
|||||||
var method: String?
|
var method: String?
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var headers: JsAny?
|
var headers: JsAny? /* Headers|JsArray<JsArray<JsString>>|OpenEndedDictionary<JsString> */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var body: JsAny?
|
var body: JsAny? /* Blob|BufferSource|FormData|URLSearchParams|String */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var referrer: String?
|
var referrer: String?
|
||||||
@@ -102,12 +102,12 @@ public external interface RequestInit : JsAny {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@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 };") }
|
public fun RequestInit(method: String? = undefined, headers: JsAny? /* Headers|JsArray<JsArray<JsString>>|OpenEndedDictionary<JsString> */ = undefined, body: JsAny? /* Blob|BufferSource|FormData|URLSearchParams|String */ = 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
|
* Exposes the JavaScript [Response](https://developer.mozilla.org/en/docs/Web/API/Response) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external open class Response(body: JsAny? = definedExternally, init: ResponseInit = definedExternally) : Body, JsAny {
|
public external open class Response(body: JsAny? /* JsAny?|ReadableStream */ = definedExternally, init: ResponseInit = definedExternally) : Body, JsAny {
|
||||||
open val type: ResponseType
|
open val type: ResponseType
|
||||||
open val url: String
|
open val url: String
|
||||||
open val redirected: Boolean
|
open val redirected: Boolean
|
||||||
@@ -138,13 +138,13 @@ public external interface ResponseInit : JsAny {
|
|||||||
var statusText: String? /* = "OK" */
|
var statusText: String? /* = "OK" */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var headers: JsAny?
|
var headers: JsAny? /* Headers|JsArray<JsArray<JsString>>|OpenEndedDictionary<JsString> */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER")
|
||||||
public fun ResponseInit(status: Short? = 200, statusText: String? = "OK", headers: JsAny? = undefined): ResponseInit { js("return { status, statusText, headers };") }
|
public fun ResponseInit(status: Short? = 200, statusText: String? = "OK", headers: JsAny? /* Headers|JsArray<JsArray<JsString>>|OpenEndedDictionary<JsString> */ = undefined): ResponseInit { js("return { status, statusText, headers };") }
|
||||||
|
|
||||||
/* please, don't implement this interface! */
|
/* please, don't implement this interface! */
|
||||||
@JsName("null")
|
@JsName("null")
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.w3c.xhr.*
|
|||||||
/**
|
/**
|
||||||
* Exposes the JavaScript [Blob](https://developer.mozilla.org/en/docs/Web/API/Blob) to Kotlin
|
* Exposes the JavaScript [Blob](https://developer.mozilla.org/en/docs/Web/API/Blob) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external open class Blob(blobParts: JsArray<JsAny?> = definedExternally, options: BlobPropertyBag = definedExternally) : MediaProvider, ImageBitmapSource, JsAny {
|
public external open class Blob(blobParts: JsArray<JsAny? /* BufferSource|Blob|String */> = definedExternally, options: BlobPropertyBag = definedExternally) : MediaProvider, ImageBitmapSource, JsAny {
|
||||||
open val size: JsNumber
|
open val size: JsNumber
|
||||||
open val type: String
|
open val type: String
|
||||||
open val isClosed: Boolean
|
open val isClosed: Boolean
|
||||||
@@ -37,7 +37,7 @@ public fun BlobPropertyBag(type: String? = ""): BlobPropertyBag { js("return { t
|
|||||||
/**
|
/**
|
||||||
* Exposes the JavaScript [File](https://developer.mozilla.org/en/docs/Web/API/File) to Kotlin
|
* Exposes the JavaScript [File](https://developer.mozilla.org/en/docs/Web/API/File) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external open class File(fileBits: JsArray<JsAny?>, fileName: String, options: FilePropertyBag = definedExternally) : Blob, JsAny {
|
public external open class File(fileBits: JsArray<JsAny? /* BufferSource|Blob|String */>, fileName: String, options: FilePropertyBag = definedExternally) : Blob, JsAny {
|
||||||
open val name: String
|
open val name: String
|
||||||
open val lastModified: Int
|
open val lastModified: Int
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ public operator fun FileList.get(index: Int): File? = getMethodImplForFileList(t
|
|||||||
*/
|
*/
|
||||||
public external open class FileReader : EventTarget, JsAny {
|
public external open class FileReader : EventTarget, JsAny {
|
||||||
open val readyState: Short
|
open val readyState: Short
|
||||||
open val result: JsAny?
|
open val result: JsAny? /* String|ArrayBuffer */
|
||||||
open val error: JsAny?
|
open val error: JsAny?
|
||||||
var onloadstart: ((ProgressEvent) -> Unit)?
|
var onloadstart: ((ProgressEvent) -> Unit)?
|
||||||
var onprogress: ((ProgressEvent) -> Unit)?
|
var onprogress: ((ProgressEvent) -> Unit)?
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public external interface NotificationOptions : JsAny {
|
|||||||
var sound: String?
|
var sound: String?
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var vibrate: JsAny?
|
var vibrate: JsAny? /* Int|JsArray<JsNumber> */
|
||||||
get() = definedExternally
|
get() = definedExternally
|
||||||
set(value) = definedExternally
|
set(value) = definedExternally
|
||||||
var timestamp: JsNumber?
|
var timestamp: JsNumber?
|
||||||
@@ -101,7 +101,7 @@ public external interface NotificationOptions : JsAny {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@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 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? /* Int|JsArray<JsNumber> */ = 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 : JsAny {
|
public external interface NotificationAction : JsAny {
|
||||||
var action: String?
|
var action: String?
|
||||||
|
|||||||
@@ -316,13 +316,21 @@ public fun ExtendableMessageEventInit(data: JsAny? = undefined, origin: String?
|
|||||||
* Exposes the JavaScript [Cache](https://developer.mozilla.org/en/docs/Web/API/Cache) to Kotlin
|
* Exposes the JavaScript [Cache](https://developer.mozilla.org/en/docs/Web/API/Cache) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external abstract class Cache : JsAny {
|
public external abstract class Cache : JsAny {
|
||||||
fun match(request: JsAny?, options: CacheQueryOptions = definedExternally): Promise<JsAny?>
|
fun match(request: Request, options: CacheQueryOptions = definedExternally): Promise<JsAny?>
|
||||||
fun matchAll(request: JsAny? = definedExternally, options: CacheQueryOptions = definedExternally): Promise<JsArray<Response>>
|
fun match(request: String, options: CacheQueryOptions = definedExternally): Promise<JsAny?>
|
||||||
fun add(request: JsAny?): Promise<Nothing?>
|
fun matchAll(request: Request, options: CacheQueryOptions = definedExternally): Promise<JsArray<Response>>
|
||||||
fun addAll(requests: JsArray<JsAny?>): Promise<Nothing?>
|
fun matchAll(request: String, options: CacheQueryOptions = definedExternally): Promise<JsArray<Response>>
|
||||||
fun put(request: JsAny?, response: Response): Promise<Nothing?>
|
fun matchAll(): Promise<JsArray<Response>>
|
||||||
fun delete(request: JsAny?, options: CacheQueryOptions = definedExternally): Promise<JsBoolean>
|
fun add(request: Request): Promise<Nothing?>
|
||||||
fun keys(request: JsAny? = definedExternally, options: CacheQueryOptions = definedExternally): Promise<JsArray<Request>>
|
fun add(request: String): Promise<Nothing?>
|
||||||
|
fun addAll(requests: JsArray<JsAny? /* Request|String */>): Promise<Nothing?>
|
||||||
|
fun put(request: Request, response: Response): Promise<Nothing?>
|
||||||
|
fun put(request: String, response: Response): Promise<Nothing?>
|
||||||
|
fun delete(request: Request, options: CacheQueryOptions = definedExternally): Promise<JsBoolean>
|
||||||
|
fun delete(request: String, options: CacheQueryOptions = definedExternally): Promise<JsBoolean>
|
||||||
|
fun keys(request: Request, options: CacheQueryOptions = definedExternally): Promise<JsArray<Request>>
|
||||||
|
fun keys(request: String, options: CacheQueryOptions = definedExternally): Promise<JsArray<Request>>
|
||||||
|
fun keys(): Promise<JsArray<Request>>
|
||||||
}
|
}
|
||||||
|
|
||||||
public external interface CacheQueryOptions : JsAny {
|
public external interface CacheQueryOptions : JsAny {
|
||||||
@@ -365,7 +373,8 @@ public fun CacheBatchOperation(type: String? = undefined, request: Request? = un
|
|||||||
* Exposes the JavaScript [CacheStorage](https://developer.mozilla.org/en/docs/Web/API/CacheStorage) to Kotlin
|
* Exposes the JavaScript [CacheStorage](https://developer.mozilla.org/en/docs/Web/API/CacheStorage) to Kotlin
|
||||||
*/
|
*/
|
||||||
public external abstract class CacheStorage : JsAny {
|
public external abstract class CacheStorage : JsAny {
|
||||||
fun match(request: JsAny?, options: CacheQueryOptions = definedExternally): Promise<JsAny?>
|
fun match(request: Request, options: CacheQueryOptions = definedExternally): Promise<JsAny?>
|
||||||
|
fun match(request: String, options: CacheQueryOptions = definedExternally): Promise<JsAny?>
|
||||||
fun has(cacheName: String): Promise<JsBoolean>
|
fun has(cacheName: String): Promise<JsBoolean>
|
||||||
fun open(cacheName: String): Promise<Cache>
|
fun open(cacheName: String): Promise<Cache>
|
||||||
fun delete(cacheName: String): Promise<JsBoolean>
|
fun delete(cacheName: String): Promise<JsBoolean>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import kotlin.js.*
|
|||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.events.*
|
import org.w3c.dom.events.*
|
||||||
|
import org.w3c.dom.url.*
|
||||||
import org.w3c.files.*
|
import org.w3c.files.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,7 +49,12 @@ public external open class XMLHttpRequest : XMLHttpRequestEventTarget, JsAny {
|
|||||||
fun open(method: String, url: String)
|
fun open(method: String, url: String)
|
||||||
fun open(method: String, url: String, async: Boolean, username: String? = definedExternally, password: String? = definedExternally)
|
fun open(method: String, url: String, async: Boolean, username: String? = definedExternally, password: String? = definedExternally)
|
||||||
fun setRequestHeader(name: String, value: String)
|
fun setRequestHeader(name: String, value: String)
|
||||||
fun send(body: JsAny? = definedExternally)
|
fun send(body: Document)
|
||||||
|
fun send(body: Blob)
|
||||||
|
fun send(body: FormData)
|
||||||
|
fun send(body: URLSearchParams)
|
||||||
|
fun send(body: String)
|
||||||
|
fun send()
|
||||||
fun abort()
|
fun abort()
|
||||||
fun getResponseHeader(name: String): String?
|
fun getResponseHeader(name: String): String?
|
||||||
fun getAllResponseHeaders(): String
|
fun getAllResponseHeaders(): String
|
||||||
@@ -70,8 +76,8 @@ public external open class FormData(form: HTMLFormElement = definedExternally) :
|
|||||||
fun append(name: String, value: String)
|
fun append(name: String, value: String)
|
||||||
fun append(name: String, value: Blob, filename: String = definedExternally)
|
fun append(name: String, value: Blob, filename: String = definedExternally)
|
||||||
fun delete(name: String)
|
fun delete(name: String)
|
||||||
fun get(name: String): JsAny?
|
fun get(name: String): JsAny? /* File|String */
|
||||||
fun getAll(name: String): JsArray<JsAny?>
|
fun getAll(name: String): JsArray<JsAny? /* File|String */>
|
||||||
fun has(name: String): Boolean
|
fun has(name: String): Boolean
|
||||||
fun set(name: String, value: String)
|
fun set(name: String, value: String)
|
||||||
fun set(name: String, value: Blob, filename: String = definedExternally)
|
fun set(name: String, value: Blob, filename: String = definedExternally)
|
||||||
|
|||||||
+73
@@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* 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.idlDeclarations.*
|
||||||
|
import org.jetbrains.dukat.idlLowerings.IDLLowering
|
||||||
|
|
||||||
|
class UnionParametersOverloadsLowering : IDLLowering {
|
||||||
|
// Types that are present as union components, but somehow missing IDL declarations. Should be ignored.
|
||||||
|
private val typesMissingFromIDL: Set<String> =
|
||||||
|
setOf("CSSPseudoElement", "BufferSource")
|
||||||
|
|
||||||
|
override fun lowerInterfaceDeclaration(declaration: IDLInterfaceDeclaration, owner: IDLFileDeclaration): IDLInterfaceDeclaration {
|
||||||
|
return declaration.copy(
|
||||||
|
operations = declaration.operations.flatMap(::generateOverloads)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun generateOverloads(op: IDLOperationDeclaration): List<IDLOperationDeclaration> {
|
||||||
|
val numUnionTypes = op.arguments.count { it.type is IDLUnionTypeDeclaration }
|
||||||
|
if (numUnionTypes == 0)
|
||||||
|
return listOf(op)
|
||||||
|
|
||||||
|
if (numUnionTypes > 1)
|
||||||
|
TODO(
|
||||||
|
"""
|
||||||
|
Not supported in current implementation to keep it simple.
|
||||||
|
If updated IDL contains multiple union arguments and this check fails,
|
||||||
|
consider updating the algorithm or return listOf(op) as a fallback.
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
val unionTypedArgumentIndex = op.arguments.indexOfFirst { it.type is IDLUnionTypeDeclaration }
|
||||||
|
val unionTypedArgument = op.arguments[unionTypedArgumentIndex]
|
||||||
|
val unionType = unionTypedArgument.type as IDLUnionTypeDeclaration
|
||||||
|
|
||||||
|
var unionMembersFlattened = unionType.unionMembers
|
||||||
|
while (unionMembersFlattened.any { it is IDLUnionTypeDeclaration }) {
|
||||||
|
unionMembersFlattened = unionMembersFlattened.flatMap {
|
||||||
|
if (it is IDLUnionTypeDeclaration) it.unionMembers else listOf(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val result = unionMembersFlattened.mapNotNull { unionMember ->
|
||||||
|
if (unionMember.name in typesMissingFromIDL)
|
||||||
|
return@mapNotNull null
|
||||||
|
|
||||||
|
op.copy(
|
||||||
|
arguments = op.arguments.mapIndexed { argumentIndex, argument: IDLArgumentDeclaration ->
|
||||||
|
if (argumentIndex == unionTypedArgumentIndex) {
|
||||||
|
argument.copy(type = unionMember, defaultValue = null, optional = false)
|
||||||
|
} else {
|
||||||
|
argument.copy()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// If union typed argument is optional - create an overload without union argument.
|
||||||
|
if (unionTypedArgument.optional || unionTypedArgument.defaultValue != null) {
|
||||||
|
return result + op.copy(arguments = op.arguments.subList(0, unionTypedArgumentIndex))
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun IDLSourceSetDeclaration.addOverloadsForUnions(): IDLSourceSetDeclaration {
|
||||||
|
return UnionParametersOverloadsLowering().lowerSourceSetDeclaration(this)
|
||||||
|
}
|
||||||
+8
@@ -50,6 +50,7 @@ import org.jetbrains.dukat.panic.raiseConcern
|
|||||||
import org.jetbrains.dukat.stdlib.TSLIBROOT
|
import org.jetbrains.dukat.stdlib.TSLIBROOT
|
||||||
import org.jetbrains.dukat.stdlib.isTsStdlibPrefixed
|
import org.jetbrains.dukat.stdlib.isTsStdlibPrefixed
|
||||||
import org.jetbrains.dukat.translator.ROOT_PACKAGENAME
|
import org.jetbrains.dukat.translator.ROOT_PACKAGENAME
|
||||||
|
import org.jetbrains.dukat.translatorString.translate
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
private val jsAnyHeritageModel: HeritageModel = HeritageModel(
|
private val jsAnyHeritageModel: HeritageModel = HeritageModel(
|
||||||
@@ -224,6 +225,13 @@ private class IdlFileConverter(
|
|||||||
return when (this) {
|
return when (this) {
|
||||||
is IDLSingleTypeDeclaration -> convertToModel(isTypeParameter)
|
is IDLSingleTypeDeclaration -> convertToModel(isTypeParameter)
|
||||||
is IDLFunctionTypeDeclaration -> convertToModel()
|
is IDLFunctionTypeDeclaration -> convertToModel()
|
||||||
|
is IDLUnionTypeDeclaration -> TypeValueModel(
|
||||||
|
IdentifierEntity("JsAny"),
|
||||||
|
listOf(),
|
||||||
|
metaDescription = this.unionMembers.joinToString("|") { it.convertToModel(false).translate() },
|
||||||
|
null,
|
||||||
|
nullable = true,
|
||||||
|
)
|
||||||
//there shouldn't be any UnionTypeDeclarations at this stage
|
//there shouldn't be any UnionTypeDeclarations at this stage
|
||||||
else -> raiseConcern("unprocessed type declaration: ${this}") {
|
else -> raiseConcern("unprocessed type declaration: ${this}") {
|
||||||
TypeValueModel(
|
TypeValueModel(
|
||||||
|
|||||||
+3
-7
@@ -98,12 +98,8 @@ private class TypeResolver : IDLLowering {
|
|||||||
nullable = declaration.nullable,
|
nullable = declaration.nullable,
|
||||||
comment = declaration.comment
|
comment = declaration.comment
|
||||||
)
|
)
|
||||||
in failedToResolveUnionTypes -> IDLSingleTypeDeclaration(
|
// Keeping unresolved union types as-is to process later
|
||||||
name = "\$dynamic",
|
in failedToResolveUnionTypes -> declaration
|
||||||
typeParameter = null,
|
|
||||||
nullable = false,
|
|
||||||
comment = declaration.comment
|
|
||||||
)
|
|
||||||
else -> raiseConcern("unprocessed UnionTypeDeclaration: $this") { declaration }
|
else -> raiseConcern("unprocessed UnionTypeDeclaration: $this") { declaration }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -203,7 +199,7 @@ private class DependencyResolver(val typeResolver: TypeResolver) : IDLLowering {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun IDLSourceSetDeclaration.resolveTypes(): IDLSourceSetDeclaration {
|
fun IDLSourceSetDeclaration.resolveTypesKeepingUnions(): IDLSourceSetDeclaration {
|
||||||
val typeResolver = TypeResolver()
|
val typeResolver = TypeResolver()
|
||||||
val dependencyResolver = DependencyResolver(typeResolver)
|
val dependencyResolver = DependencyResolver(typeResolver)
|
||||||
val declarationAdder = DeclarationAdder(typeResolver)
|
val declarationAdder = DeclarationAdder(typeResolver)
|
||||||
|
|||||||
+2
-1
@@ -27,7 +27,8 @@ fun translateIdlToSourceSet(fileName: String): SourceSetModel {
|
|||||||
.resolveImplementsStatements()
|
.resolveImplementsStatements()
|
||||||
.resolveMixins()
|
.resolveMixins()
|
||||||
.addItemArrayLike()
|
.addItemArrayLike()
|
||||||
.resolveTypes()
|
.resolveTypesKeepingUnions()
|
||||||
|
.addOverloadsForUnions()
|
||||||
.markAbstractOrOpen()
|
.markAbstractOrOpen()
|
||||||
.addMissingMembers()
|
.addMissingMembers()
|
||||||
.addOverloadsForCallbacks()
|
.addOverloadsForCallbacks()
|
||||||
|
|||||||
Reference in New Issue
Block a user