IDL2K restrict readonly attributes to vals

This commit is contained in:
Sergey Mashkov
2015-06-16 19:44:48 +03:00
parent c0c0f6152a
commit 2cc708c5a9
14 changed files with 1137 additions and 2043 deletions
@@ -56,39 +56,30 @@ native public interface WebGLUniformLocation {
} }
native public interface WebGLActiveInfo { native public interface WebGLActiveInfo {
var size: Int val size: Int
get() = noImpl get() = noImpl
set(value) = noImpl val type: Int
var type: Int
get() = noImpl get() = noImpl
set(value) = noImpl val name: String
var name: String
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public interface WebGLShaderPrecisionFormat { native public interface WebGLShaderPrecisionFormat {
var rangeMin: Int val rangeMin: Int
get() = noImpl get() = noImpl
set(value) = noImpl val rangeMax: Int
var rangeMax: Int
get() = noImpl get() = noImpl
set(value) = noImpl val precision: Int
var precision: Int
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public interface WebGLRenderingContext : RenderingContext { native public interface WebGLRenderingContext : RenderingContext {
var canvas: HTMLCanvasElement val canvas: HTMLCanvasElement
get() = noImpl get() = noImpl
set(value) = noImpl val drawingBufferWidth: Int
var drawingBufferWidth: Int
get() = noImpl get() = noImpl
set(value) = noImpl val drawingBufferHeight: Int
var drawingBufferHeight: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun getContextAttributes(): WebGLContextAttributes? = noImpl fun getContextAttributes(): WebGLContextAttributes? = noImpl
fun isContextLost(): Boolean = noImpl fun isContextLost(): Boolean = noImpl
fun getSupportedExtensions(): Array<String>? = noImpl fun getSupportedExtensions(): Array<String>? = noImpl
@@ -546,9 +537,8 @@ native public interface WebGLRenderingContext : RenderingContext {
} }
native public open class WebGLContextEvent(type: String, eventInit: WebGLContextEventInit = noImpl) : Event(type, noImpl) { native public open class WebGLContextEvent(type: String, eventInit: WebGLContextEventInit = noImpl) : Event(type, noImpl) {
var statusMessage: String open val statusMessage: String
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public open class WebGLContextEventInit : EventInit() { native public open class WebGLContextEventInit : EventInit() {
@@ -556,9 +546,8 @@ native public open class WebGLContextEventInit : EventInit() {
} }
native public open class ArrayBuffer(length: Int) : Transferable { native public open class ArrayBuffer(length: Int) : Transferable {
var byteLength: Int open val byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun slice(begin: Int, end: Int = noImpl): ArrayBuffer = noImpl fun slice(begin: Int, end: Int = noImpl): ArrayBuffer = noImpl
companion object { companion object {
@@ -571,18 +560,14 @@ native public open class Int8Array : ArrayBufferView {
constructor(array: Int8Array) constructor(array: Int8Array)
constructor(array: Array<Byte>) constructor(array: Array<Byte>)
constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl) constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl)
var length: Int open val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val buffer: ArrayBuffer
var buffer: ArrayBuffer
get() = noImpl get() = noImpl
set(value) = noImpl open val byteOffset: Int
var byteOffset: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val byteLength: Int
var byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun get(index: Int): Byte = noImpl fun get(index: Int): Byte = noImpl
fun set(index: Int, value: Byte): Unit = noImpl fun set(index: Int, value: Byte): Unit = noImpl
fun set(array: Int8Array, offset: Int = noImpl): Unit = noImpl fun set(array: Int8Array, offset: Int = noImpl): Unit = noImpl
@@ -599,18 +584,14 @@ native public open class Uint8Array : ArrayBufferView {
constructor(array: Uint8Array) constructor(array: Uint8Array)
constructor(array: Array<Byte>) constructor(array: Array<Byte>)
constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl) constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl)
var length: Int open val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val buffer: ArrayBuffer
var buffer: ArrayBuffer
get() = noImpl get() = noImpl
set(value) = noImpl open val byteOffset: Int
var byteOffset: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val byteLength: Int
var byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun get(index: Int): Byte = noImpl fun get(index: Int): Byte = noImpl
fun set(index: Int, value: Byte): Unit = noImpl fun set(index: Int, value: Byte): Unit = noImpl
fun set(array: Uint8Array, offset: Int = noImpl): Unit = noImpl fun set(array: Uint8Array, offset: Int = noImpl): Unit = noImpl
@@ -627,18 +608,14 @@ native public open class Uint8ClampedArray : ArrayBufferView {
constructor(array: Uint8ClampedArray) constructor(array: Uint8ClampedArray)
constructor(array: Array<Byte>) constructor(array: Array<Byte>)
constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl) constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl)
var length: Int open val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val buffer: ArrayBuffer
var buffer: ArrayBuffer
get() = noImpl get() = noImpl
set(value) = noImpl open val byteOffset: Int
var byteOffset: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val byteLength: Int
var byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun get(index: Int): Byte = noImpl fun get(index: Int): Byte = noImpl
fun set(index: Int, value: Byte): Unit = noImpl fun set(index: Int, value: Byte): Unit = noImpl
fun set(array: Uint8ClampedArray, offset: Int = noImpl): Unit = noImpl fun set(array: Uint8ClampedArray, offset: Int = noImpl): Unit = noImpl
@@ -655,18 +632,14 @@ native public open class Int16Array : ArrayBufferView {
constructor(array: Int16Array) constructor(array: Int16Array)
constructor(array: Array<Short>) constructor(array: Array<Short>)
constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl) constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl)
var length: Int open val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val buffer: ArrayBuffer
var buffer: ArrayBuffer
get() = noImpl get() = noImpl
set(value) = noImpl open val byteOffset: Int
var byteOffset: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val byteLength: Int
var byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun get(index: Int): Short = noImpl fun get(index: Int): Short = noImpl
fun set(index: Int, value: Short): Unit = noImpl fun set(index: Int, value: Short): Unit = noImpl
fun set(array: Int16Array, offset: Int = noImpl): Unit = noImpl fun set(array: Int16Array, offset: Int = noImpl): Unit = noImpl
@@ -683,18 +656,14 @@ native public open class Uint16Array : ArrayBufferView {
constructor(array: Uint16Array) constructor(array: Uint16Array)
constructor(array: Array<Short>) constructor(array: Array<Short>)
constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl) constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl)
var length: Int open val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val buffer: ArrayBuffer
var buffer: ArrayBuffer
get() = noImpl get() = noImpl
set(value) = noImpl open val byteOffset: Int
var byteOffset: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val byteLength: Int
var byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun get(index: Int): Short = noImpl fun get(index: Int): Short = noImpl
fun set(index: Int, value: Short): Unit = noImpl fun set(index: Int, value: Short): Unit = noImpl
fun set(array: Uint16Array, offset: Int = noImpl): Unit = noImpl fun set(array: Uint16Array, offset: Int = noImpl): Unit = noImpl
@@ -711,18 +680,14 @@ native public open class Int32Array : ArrayBufferView {
constructor(array: Int32Array) constructor(array: Int32Array)
constructor(array: Array<Int>) constructor(array: Array<Int>)
constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl) constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl)
var length: Int open val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val buffer: ArrayBuffer
var buffer: ArrayBuffer
get() = noImpl get() = noImpl
set(value) = noImpl open val byteOffset: Int
var byteOffset: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val byteLength: Int
var byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun get(index: Int): Int = noImpl fun get(index: Int): Int = noImpl
fun set(index: Int, value: Int): Unit = noImpl fun set(index: Int, value: Int): Unit = noImpl
fun set(array: Int32Array, offset: Int = noImpl): Unit = noImpl fun set(array: Int32Array, offset: Int = noImpl): Unit = noImpl
@@ -739,18 +704,14 @@ native public open class Uint32Array : ArrayBufferView {
constructor(array: Uint32Array) constructor(array: Uint32Array)
constructor(array: Array<Int>) constructor(array: Array<Int>)
constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl) constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl)
var length: Int open val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val buffer: ArrayBuffer
var buffer: ArrayBuffer
get() = noImpl get() = noImpl
set(value) = noImpl open val byteOffset: Int
var byteOffset: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val byteLength: Int
var byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun get(index: Int): Int = noImpl fun get(index: Int): Int = noImpl
fun set(index: Int, value: Int): Unit = noImpl fun set(index: Int, value: Int): Unit = noImpl
fun set(array: Uint32Array, offset: Int = noImpl): Unit = noImpl fun set(array: Uint32Array, offset: Int = noImpl): Unit = noImpl
@@ -767,18 +728,14 @@ native public open class Float32Array : ArrayBufferView {
constructor(array: Float32Array) constructor(array: Float32Array)
constructor(array: Array<Float>) constructor(array: Array<Float>)
constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl) constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl)
var length: Int open val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val buffer: ArrayBuffer
var buffer: ArrayBuffer
get() = noImpl get() = noImpl
set(value) = noImpl open val byteOffset: Int
var byteOffset: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val byteLength: Int
var byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun get(index: Int): Float = noImpl fun get(index: Int): Float = noImpl
fun set(index: Int, value: Float): Unit = noImpl fun set(index: Int, value: Float): Unit = noImpl
fun set(array: Float32Array, offset: Int = noImpl): Unit = noImpl fun set(array: Float32Array, offset: Int = noImpl): Unit = noImpl
@@ -795,18 +752,14 @@ native public open class Float64Array : ArrayBufferView {
constructor(array: Float64Array) constructor(array: Float64Array)
constructor(array: Array<Double>) constructor(array: Array<Double>)
constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl) constructor(buffer: ArrayBuffer, byteOffset: Int = noImpl, length: Int = noImpl)
var length: Int open val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val buffer: ArrayBuffer
var buffer: ArrayBuffer
get() = noImpl get() = noImpl
set(value) = noImpl open val byteOffset: Int
var byteOffset: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val byteLength: Int
var byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun get(index: Int): Double = noImpl fun get(index: Int): Double = noImpl
fun set(index: Int, value: Double): Unit = noImpl fun set(index: Int, value: Double): Unit = noImpl
fun set(array: Float64Array, offset: Int = noImpl): Unit = noImpl fun set(array: Float64Array, offset: Int = noImpl): Unit = noImpl
@@ -819,15 +772,12 @@ native public open class Float64Array : ArrayBufferView {
} }
native public open class DataView(buffer: ArrayBuffer, byteOffset: Int = noImpl, byteLength: Int = noImpl) : ArrayBufferView { native public open class DataView(buffer: ArrayBuffer, byteOffset: Int = noImpl, byteLength: Int = noImpl) : ArrayBufferView {
var buffer: ArrayBuffer open val buffer: ArrayBuffer
get() = noImpl get() = noImpl
set(value) = noImpl open val byteOffset: Int
var byteOffset: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val byteLength: Int
var byteLength: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun getInt8(byteOffset: Int): Byte = noImpl fun getInt8(byteOffset: Int): Byte = noImpl
fun getUint8(byteOffset: Int): Byte = noImpl fun getUint8(byteOffset: Int): Byte = noImpl
fun getInt16(byteOffset: Int, littleEndian: Boolean = noImpl): Short = noImpl fun getInt16(byteOffset: Int, littleEndian: Boolean = noImpl): Short = noImpl
@@ -24,9 +24,8 @@ native public interface MediaList {
var mediaText: String var mediaText: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var length: Int val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun item(index: Int): String? = noImpl fun item(index: Int): String? = noImpl
nativeGetter fun get(index: Int): String? = noImpl nativeGetter fun get(index: Int): String? = noImpl
fun appendMedium(medium: String): Unit = noImpl fun appendMedium(medium: String): Unit = noImpl
@@ -34,69 +33,56 @@ native public interface MediaList {
} }
native public interface StyleSheet { native public interface StyleSheet {
var type: String val type: String
get() = noImpl get() = noImpl
set(value) = noImpl val href: String?
var href: String?
get() = noImpl get() = noImpl
set(value) = noImpl val ownerNode: UnionElementOrProcessingInstruction?
var ownerNode: UnionElementOrProcessingInstruction?
get() = noImpl get() = noImpl
set(value) = noImpl val parentStyleSheet: StyleSheet?
var parentStyleSheet: StyleSheet?
get() = noImpl get() = noImpl
set(value) = noImpl val title: String?
var title: String?
get() = noImpl get() = noImpl
set(value) = noImpl val media: MediaList
var media: MediaList
get() = noImpl get() = noImpl
set(value) = noImpl
var disabled: Boolean var disabled: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
} }
native public interface CSSStyleSheet : StyleSheet { native public interface CSSStyleSheet : StyleSheet {
var ownerRule: CSSRule? val ownerRule: CSSRule?
get() = noImpl get() = noImpl
set(value) = noImpl val cssRules: CSSRuleList
var cssRules: CSSRuleList
get() = noImpl get() = noImpl
set(value) = noImpl
fun insertRule(rule: String, index: Int): Int = noImpl fun insertRule(rule: String, index: Int): Int = noImpl
fun deleteRule(index: Int): Unit = noImpl fun deleteRule(index: Int): Unit = noImpl
} }
native public interface StyleSheetList { native public interface StyleSheetList {
var length: Int val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun item(index: Int): StyleSheet? = noImpl fun item(index: Int): StyleSheet? = noImpl
nativeGetter fun get(index: Int): StyleSheet? = noImpl nativeGetter fun get(index: Int): StyleSheet? = noImpl
} }
native public interface CSSRuleList { native public interface CSSRuleList {
var length: Int val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun item(index: Int): CSSRule? = noImpl fun item(index: Int): CSSRule? = noImpl
nativeGetter fun get(index: Int): CSSRule? = noImpl nativeGetter fun get(index: Int): CSSRule? = noImpl
} }
native public interface CSSRule { native public interface CSSRule {
var type: Short val type: Short
get() = noImpl get() = noImpl
set(value) = noImpl
var cssText: String var cssText: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var parentRule: CSSRule? val parentRule: CSSRule?
get() = noImpl get() = noImpl
set(value) = noImpl val parentStyleSheet: CSSStyleSheet?
var parentStyleSheet: CSSStyleSheet?
get() = noImpl get() = noImpl
set(value) = noImpl
companion object { companion object {
val STYLE_RULE: Short = 1 val STYLE_RULE: Short = 1
@@ -114,53 +100,44 @@ native public interface CSSStyleRule : CSSRule {
var selectorText: String var selectorText: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var style: CSSStyleDeclaration val style: CSSStyleDeclaration
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public interface CSSImportRule : CSSRule { native public interface CSSImportRule : CSSRule {
var href: String val href: String
get() = noImpl get() = noImpl
set(value) = noImpl val media: MediaList
var media: MediaList
get() = noImpl get() = noImpl
set(value) = noImpl val styleSheet: CSSStyleSheet
var styleSheet: CSSStyleSheet
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public interface CSSGroupingRule : CSSRule { native public interface CSSGroupingRule : CSSRule {
var cssRules: CSSRuleList val cssRules: CSSRuleList
get() = noImpl get() = noImpl
set(value) = noImpl
fun insertRule(rule: String, index: Int): Int = noImpl fun insertRule(rule: String, index: Int): Int = noImpl
fun deleteRule(index: Int): Unit = noImpl fun deleteRule(index: Int): Unit = noImpl
} }
native public interface CSSMediaRule : CSSGroupingRule { native public interface CSSMediaRule : CSSGroupingRule {
var media: MediaList val media: MediaList
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public interface CSSPageRule : CSSGroupingRule { native public interface CSSPageRule : CSSGroupingRule {
var selectorText: String var selectorText: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var style: CSSStyleDeclaration val style: CSSStyleDeclaration
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public interface CSSMarginRule : CSSRule { native public interface CSSMarginRule : CSSRule {
var name: String val name: String
get() = noImpl get() = noImpl
set(value) = noImpl val style: CSSStyleDeclaration
var style: CSSStyleDeclaration
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public interface CSSNamespaceRule : CSSRule { native public interface CSSNamespaceRule : CSSRule {
@@ -848,12 +825,10 @@ native public interface CSSStyleDeclaration {
var cssText: String var cssText: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var length: Int val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl val parentRule: CSSRule?
var parentRule: CSSRule?
get() = noImpl get() = noImpl
set(value) = noImpl
var _dashed_attribute: String var _dashed_attribute: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -871,18 +846,14 @@ native public interface CSSStyleDeclaration {
} }
native public interface PseudoElement : GeometryNode { native public interface PseudoElement : GeometryNode {
var cascadedStyle: CSSStyleDeclaration val cascadedStyle: CSSStyleDeclaration
get() = noImpl get() = noImpl
set(value) = noImpl val defaultStyle: CSSStyleDeclaration
var defaultStyle: CSSStyleDeclaration
get() = noImpl get() = noImpl
set(value) = noImpl val rawComputedStyle: CSSStyleDeclaration
var rawComputedStyle: CSSStyleDeclaration
get() = noImpl get() = noImpl
set(value) = noImpl val usedStyle: CSSStyleDeclaration
var usedStyle: CSSStyleDeclaration
get() = noImpl get() = noImpl
set(value) = noImpl
fun getBoxQuads(options: BoxQuadOptions = noImpl): Array<DOMQuad> = noImpl fun getBoxQuads(options: BoxQuadOptions = noImpl): Array<DOMQuad> = noImpl
fun convertQuadFromNode(quad: DOMQuad, from: GeometryNode, options: ConvertCoordinateOptions = noImpl): DOMQuad = noImpl fun convertQuadFromNode(quad: DOMQuad, from: GeometryNode, options: ConvertCoordinateOptions = noImpl): DOMQuad = noImpl
fun convertRectFromNode(rect: DOMRectReadOnly, from: GeometryNode, options: ConvertCoordinateOptions = noImpl): DOMQuad = noImpl fun convertRectFromNode(rect: DOMRectReadOnly, from: GeometryNode, options: ConvertCoordinateOptions = noImpl): DOMQuad = noImpl
@@ -21,104 +21,73 @@ import org.w3c.workers.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public open class MouseEvent(typeArg: String, mouseEventInitDict: MouseEventInit = noImpl) : UIEvent(noImpl, noImpl), UnionElementOrMouseEvent { native public open class MouseEvent(typeArg: String, mouseEventInitDict: MouseEventInit = noImpl) : UIEvent(noImpl, noImpl), UnionElementOrMouseEvent {
var screenX: Int open val screenX: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val screenY: Int
var screenY: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val clientX: Int
var clientX: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val clientY: Int
var clientY: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val ctrlKey: Boolean
var ctrlKey: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val shiftKey: Boolean
var shiftKey: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val altKey: Boolean
var altKey: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val metaKey: Boolean
var metaKey: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val button: Short
var button: Short
get() = noImpl get() = noImpl
set(value) = noImpl open val relatedTarget: EventTarget?
var relatedTarget: EventTarget?
get() = noImpl get() = noImpl
set(value) = noImpl open val buttons: Short
var buttons: Short
get() = noImpl get() = noImpl
set(value) = noImpl open val region: String?
var region: String?
get() = noImpl get() = noImpl
set(value) = noImpl // open val screenX: Double
// var screenX: Double
// get() = noImpl // get() = noImpl
// set(value) = noImpl // open val screenY: Double
// var screenY: Double
// get() = noImpl // get() = noImpl
// set(value) = noImpl open val pageX: Double
var pageX: Double
get() = noImpl get() = noImpl
set(value) = noImpl open val pageY: Double
var pageY: Double
get() = noImpl get() = noImpl
set(value) = noImpl // open val clientX: Double
// var clientX: Double
// get() = noImpl // get() = noImpl
// set(value) = noImpl // open val clientY: Double
// var clientY: Double
// get() = noImpl // get() = noImpl
// set(value) = noImpl // open val x: Double
// var x: Double
// get() = noImpl // get() = noImpl
// set(value) = noImpl // open val y: Double
// var y: Double
// get() = noImpl // get() = noImpl
// set(value) = noImpl open val offsetX: Double
var offsetX: Double
get() = noImpl get() = noImpl
set(value) = noImpl open val offsetY: Double
var offsetY: Double
get() = noImpl get() = noImpl
set(value) = noImpl
fun getModifierState(keyArg: String): Boolean = noImpl fun getModifierState(keyArg: String): Boolean = noImpl
fun initMouseEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, detailArg: Int, screenXArg: Int, screenYArg: Int, clientXArg: Int, clientYArg: Int, ctrlKeyArg: Boolean, altKeyArg: Boolean, shiftKeyArg: Boolean, metaKeyArg: Boolean, buttonArg: Short, relatedTargetArg: EventTarget?): Unit = noImpl fun initMouseEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, detailArg: Int, screenXArg: Int, screenYArg: Int, clientXArg: Int, clientYArg: Int, ctrlKeyArg: Boolean, altKeyArg: Boolean, shiftKeyArg: Boolean, metaKeyArg: Boolean, buttonArg: Short, relatedTargetArg: EventTarget?): Unit = noImpl
} }
native public open class Event(type: String, eventInitDict: EventInit = noImpl) { native public open class Event(type: String, eventInitDict: EventInit = noImpl) {
var type: String open val type: String
get() = noImpl get() = noImpl
set(value) = noImpl open val target: EventTarget?
var target: EventTarget?
get() = noImpl get() = noImpl
set(value) = noImpl open val currentTarget: EventTarget?
var currentTarget: EventTarget?
get() = noImpl get() = noImpl
set(value) = noImpl open val eventPhase: Short
var eventPhase: Short
get() = noImpl get() = noImpl
set(value) = noImpl open val bubbles: Boolean
var bubbles: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val cancelable: Boolean
var cancelable: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val defaultPrevented: Boolean
var defaultPrevented: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val isTrusted: Boolean
var isTrusted: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val timeStamp: Number
var timeStamp: Number
get() = noImpl get() = noImpl
set(value) = noImpl
fun stopPropagation(): Unit = noImpl fun stopPropagation(): Unit = noImpl
fun stopImmediatePropagation(): Unit = noImpl fun stopImmediatePropagation(): Unit = noImpl
fun preventDefault(): Unit = noImpl fun preventDefault(): Unit = noImpl
@@ -145,12 +114,10 @@ native public interface EventListener {
} }
native public open class UIEvent(type: String, eventInitDict: UIEventInit = noImpl) : Event(type, eventInitDict) { native public open class UIEvent(type: String, eventInitDict: UIEventInit = noImpl) : Event(type, eventInitDict) {
var view: Window? open val view: Window?
get() = noImpl get() = noImpl
set(value) = noImpl open val detail: Int
var detail: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun initUIEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, detailArg: Int): Unit = noImpl fun initUIEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, detailArg: Int): Unit = noImpl
} }
@@ -160,9 +127,8 @@ native public open class UIEventInit : EventInit() {
} }
native public open class FocusEvent(typeArg: String, focusEventInitDict: FocusEventInit = noImpl) : UIEvent(noImpl, noImpl) { native public open class FocusEvent(typeArg: String, focusEventInitDict: FocusEventInit = noImpl) : UIEvent(noImpl, noImpl) {
var relatedTarget: EventTarget? open val relatedTarget: EventTarget?
get() = noImpl get() = noImpl
set(value) = noImpl
fun initFocusEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, detailArg: Int, relatedTargetArg: EventTarget?): Unit = noImpl fun initFocusEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, detailArg: Int, relatedTargetArg: EventTarget?): Unit = noImpl
} }
@@ -199,18 +165,14 @@ native public open class EventModifierInit : UIEventInit() {
} }
native public open class WheelEvent(typeArg: String, wheelEventInitDict: WheelEventInit = noImpl) : MouseEvent(typeArg, noImpl) { native public open class WheelEvent(typeArg: String, wheelEventInitDict: WheelEventInit = noImpl) : MouseEvent(typeArg, noImpl) {
var deltaX: Double open val deltaX: Double
get() = noImpl get() = noImpl
set(value) = noImpl open val deltaY: Double
var deltaY: Double
get() = noImpl get() = noImpl
set(value) = noImpl open val deltaZ: Double
var deltaZ: Double
get() = noImpl get() = noImpl
set(value) = noImpl open val deltaMode: Int
var deltaMode: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun initWheelEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, detailArg: Int, screenXArg: Int, screenYArg: Int, clientXArg: Int, clientYArg: Int, buttonArg: Short, relatedTargetArg: EventTarget?, modifiersListArg: String, deltaXArg: Double, deltaYArg: Double, deltaZArg: Double, deltaMode: Int): Unit = noImpl fun initWheelEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, detailArg: Int, screenXArg: Int, screenYArg: Int, clientXArg: Int, clientYArg: Int, buttonArg: Short, relatedTargetArg: EventTarget?, modifiersListArg: String, deltaXArg: Double, deltaYArg: Double, deltaZArg: Double, deltaMode: Int): Unit = noImpl
companion object { companion object {
@@ -228,42 +190,30 @@ native public open class WheelEventInit : MouseEventInit() {
} }
native public open class KeyboardEvent(typeArg: String, keyboardEventInitDict: KeyboardEventInit = noImpl) : UIEvent(noImpl, noImpl) { native public open class KeyboardEvent(typeArg: String, keyboardEventInitDict: KeyboardEventInit = noImpl) : UIEvent(noImpl, noImpl) {
var key: String open val key: String
get() = noImpl get() = noImpl
set(value) = noImpl open val code: String
var code: String
get() = noImpl get() = noImpl
set(value) = noImpl open val location: Int
var location: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val ctrlKey: Boolean
var ctrlKey: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val shiftKey: Boolean
var shiftKey: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val altKey: Boolean
var altKey: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val metaKey: Boolean
var metaKey: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val repeat: Boolean
var repeat: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val isComposing: Boolean
var isComposing: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val charCode: Int
var charCode: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val keyCode: Int
var keyCode: Int
get() = noImpl get() = noImpl
set(value) = noImpl open val which: Int
var which: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun getModifierState(keyArg: String): Boolean = noImpl fun getModifierState(keyArg: String): Boolean = noImpl
fun initKeyboardEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, keyArg: String, locationArg: Int, modifiersListArg: String, repeat: Boolean, locale: String): Unit = noImpl fun initKeyboardEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, keyArg: String, locationArg: Int, modifiersListArg: String, repeat: Boolean, locale: String): Unit = noImpl
@@ -284,9 +234,8 @@ native public open class KeyboardEventInit : EventModifierInit() {
} }
native public open class CompositionEvent(typeArg: String, compositionEventInitDict: CompositionEventInit = noImpl) : UIEvent(noImpl, noImpl) { native public open class CompositionEvent(typeArg: String, compositionEventInitDict: CompositionEventInit = noImpl) : UIEvent(noImpl, noImpl) {
var data: String open val data: String
get() = noImpl get() = noImpl
set(value) = noImpl
fun initCompositionEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, dataArg: String, locale: String): Unit = noImpl fun initCompositionEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, viewArg: Window?, dataArg: String, locale: String): Unit = noImpl
} }
@@ -295,21 +244,16 @@ native public open class CompositionEventInit : UIEventInit() {
} }
native public open class MutationEvent : Event(noImpl, noImpl) { native public open class MutationEvent : Event(noImpl, noImpl) {
var relatedNode: Node? open val relatedNode: Node?
get() = noImpl get() = noImpl
set(value) = noImpl open val prevValue: String
var prevValue: String
get() = noImpl get() = noImpl
set(value) = noImpl open val newValue: String
var newValue: String
get() = noImpl get() = noImpl
set(value) = noImpl open val attrName: String
var attrName: String
get() = noImpl get() = noImpl
set(value) = noImpl open val attrChange: Short
var attrChange: Short
get() = noImpl get() = noImpl
set(value) = noImpl
fun initMutationEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, relatedNodeArg: Node?, prevValueArg: String, newValueArg: String, attrNameArg: String, attrChangeArg: Short): Unit = noImpl fun initMutationEvent(typeArg: String, bubblesArg: Boolean, cancelableArg: Boolean, relatedNodeArg: Node?, prevValueArg: String, newValueArg: String, attrNameArg: String, attrChangeArg: Short): Unit = noImpl
companion object { companion object {
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -24,9 +24,8 @@ native public open class URL(url: String, base: String = noImpl) {
var href: String var href: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var origin: String open val origin: String
get() = noImpl get() = noImpl
set(value) = noImpl
var protocol: String var protocol: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
+17 -34
View File
@@ -30,36 +30,26 @@ native public open class Headers(init: dynamic = noImpl) {
} }
native public open class Request(input: dynamic, init: RequestInit = noImpl) { native public open class Request(input: dynamic, init: RequestInit = noImpl) {
var method: String open val method: String
get() = noImpl get() = noImpl
set(value) = noImpl open val url: String
var url: String
get() = noImpl get() = noImpl
set(value) = noImpl open val headers: Headers
var headers: Headers
get() = noImpl get() = noImpl
set(value) = noImpl open val context: String
var context: String
get() = noImpl get() = noImpl
set(value) = noImpl open val referrer: String
var referrer: String
get() = noImpl get() = noImpl
set(value) = noImpl open val mode: String
var mode: String
get() = noImpl get() = noImpl
set(value) = noImpl open val credentials: String
var credentials: String
get() = noImpl get() = noImpl
set(value) = noImpl open val cache: String
var cache: String
get() = noImpl get() = noImpl
set(value) = noImpl open val redirect: String
var redirect: String
get() = noImpl get() = noImpl
set(value) = noImpl open val bodyUsed: Boolean
var bodyUsed: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl
fun clone(): Request = noImpl fun clone(): Request = noImpl
fun arrayBuffer(): dynamic = noImpl fun arrayBuffer(): dynamic = noImpl
fun blob(): dynamic = noImpl fun blob(): dynamic = noImpl
@@ -79,27 +69,20 @@ native public open class RequestInit {
} }
native public open class Response(body: dynamic = noImpl, init: ResponseInit = noImpl) { native public open class Response(body: dynamic = noImpl, init: ResponseInit = noImpl) {
var type: String open val type: String
get() = noImpl get() = noImpl
set(value) = noImpl open val url: String
var url: String
get() = noImpl get() = noImpl
set(value) = noImpl open val status: Short
var status: Short
get() = noImpl get() = noImpl
set(value) = noImpl open val ok: Boolean
var ok: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val statusText: String
var statusText: String
get() = noImpl get() = noImpl
set(value) = noImpl open val headers: Headers
var headers: Headers
get() = noImpl get() = noImpl
set(value) = noImpl open val bodyUsed: Boolean
var bodyUsed: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl
fun clone(): Response = noImpl fun clone(): Response = noImpl
fun arrayBuffer(): dynamic = noImpl fun arrayBuffer(): dynamic = noImpl
fun blob(): dynamic = noImpl fun blob(): dynamic = noImpl
+9 -18
View File
@@ -22,15 +22,12 @@ import org.w3c.xhr.*
native public open class Blob() : ImageBitmapSource { native public open class Blob() : ImageBitmapSource {
constructor(blobParts: Array<dynamic>, options: BlobPropertyBag = noImpl) : this() constructor(blobParts: Array<dynamic>, options: BlobPropertyBag = noImpl) : this()
var size: Long open val size: Long
get() = noImpl get() = noImpl
set(value) = noImpl open val type: String
var type: String
get() = noImpl get() = noImpl
set(value) = noImpl open val isClosed: Boolean
var isClosed: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl
fun slice(start: Long = noImpl, end: Long = noImpl, contentType: String = noImpl): Blob = noImpl fun slice(start: Long = noImpl, end: Long = noImpl, contentType: String = noImpl): Blob = noImpl
fun close(): Unit = noImpl fun close(): Unit = noImpl
} }
@@ -40,12 +37,10 @@ native public open class BlobPropertyBag {
} }
native public open class File(fileBits: Array<dynamic>, fileName: String, options: FilePropertyBag = noImpl) : Blob() { native public open class File(fileBits: Array<dynamic>, fileName: String, options: FilePropertyBag = noImpl) : Blob() {
var name: String open val name: String
get() = noImpl get() = noImpl
set(value) = noImpl open val lastModified: Long
var lastModified: Long
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public open class FilePropertyBag { native public open class FilePropertyBag {
@@ -54,23 +49,19 @@ native public open class FilePropertyBag {
} }
native public interface FileList { native public interface FileList {
var length: Int val length: Int
get() = noImpl get() = noImpl
set(value) = noImpl
fun item(index: Int): File? = noImpl fun item(index: Int): File? = noImpl
nativeGetter fun get(index: Int): File? = noImpl nativeGetter fun get(index: Int): File? = noImpl
} }
native public open class FileReader : EventTarget { native public open class FileReader : EventTarget {
var readyState: Short open val readyState: Short
get() = noImpl get() = noImpl
set(value) = noImpl open val result: dynamic
var result: dynamic
get() = noImpl get() = noImpl
set(value) = noImpl open val error: dynamic
var error: dynamic
get() = noImpl get() = noImpl
set(value) = noImpl
var onloadstart: ((Event) -> dynamic)? var onloadstart: ((Event) -> dynamic)?
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -27,42 +27,30 @@ native public open class Notification(title: String, options: NotificationOption
var onerror: ((Event) -> dynamic)? var onerror: ((Event) -> dynamic)?
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var title: String open val title: String
get() = noImpl get() = noImpl
set(value) = noImpl open val dir: String
var dir: String
get() = noImpl get() = noImpl
set(value) = noImpl open val lang: String
var lang: String
get() = noImpl get() = noImpl
set(value) = noImpl open val body: String
var body: String
get() = noImpl get() = noImpl
set(value) = noImpl open val tag: String
var tag: String
get() = noImpl get() = noImpl
set(value) = noImpl open val icon: String
var icon: String
get() = noImpl get() = noImpl
set(value) = noImpl open val sound: String
var sound: String
get() = noImpl get() = noImpl
set(value) = noImpl open val renotify: Boolean
var renotify: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val silent: Boolean
var silent: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val noscreen: Boolean
var noscreen: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val sticky: Boolean
var sticky: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val data: Any?
var data: Any?
get() = noImpl get() = noImpl
set(value) = noImpl
fun close(): Unit = noImpl fun close(): Unit = noImpl
companion object { companion object {
@@ -93,9 +81,8 @@ native public open class GetNotificationOptions {
} }
native public open class NotificationEvent(type: String, eventInitDict: NotificationEventInit = noImpl) : ExtendableEvent(type, eventInitDict) { native public open class NotificationEvent(type: String, eventInitDict: NotificationEventInit = noImpl) : ExtendableEvent(type, eventInitDict) {
var notification: Notification open val notification: Notification
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public open class NotificationEventInit : ExtendableEventInit() { native public open class NotificationEventInit : ExtendableEventInit() {
@@ -21,88 +21,63 @@ import org.w3c.workers.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public interface Performance { native public interface Performance {
var timing: PerformanceTiming val timing: PerformanceTiming
get() = noImpl get() = noImpl
set(value) = noImpl val navigation: PerformanceNavigation
var navigation: PerformanceNavigation
get() = noImpl get() = noImpl
set(value) = noImpl
fun now(): Double = noImpl fun now(): Double = noImpl
} }
native public interface PerformanceTiming { native public interface PerformanceTiming {
var navigationStart: Long val navigationStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val unloadEventStart: Long
var unloadEventStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val unloadEventEnd: Long
var unloadEventEnd: Long
get() = noImpl get() = noImpl
set(value) = noImpl val redirectStart: Long
var redirectStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val redirectEnd: Long
var redirectEnd: Long
get() = noImpl get() = noImpl
set(value) = noImpl val fetchStart: Long
var fetchStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val domainLookupStart: Long
var domainLookupStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val domainLookupEnd: Long
var domainLookupEnd: Long
get() = noImpl get() = noImpl
set(value) = noImpl val connectStart: Long
var connectStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val connectEnd: Long
var connectEnd: Long
get() = noImpl get() = noImpl
set(value) = noImpl val secureConnectionStart: Long
var secureConnectionStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val requestStart: Long
var requestStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val responseStart: Long
var responseStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val responseEnd: Long
var responseEnd: Long
get() = noImpl get() = noImpl
set(value) = noImpl val domLoading: Long
var domLoading: Long
get() = noImpl get() = noImpl
set(value) = noImpl val domInteractive: Long
var domInteractive: Long
get() = noImpl get() = noImpl
set(value) = noImpl val domContentLoadedEventStart: Long
var domContentLoadedEventStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val domContentLoadedEventEnd: Long
var domContentLoadedEventEnd: Long
get() = noImpl get() = noImpl
set(value) = noImpl val domComplete: Long
var domComplete: Long
get() = noImpl get() = noImpl
set(value) = noImpl val loadEventStart: Long
var loadEventStart: Long
get() = noImpl get() = noImpl
set(value) = noImpl val loadEventEnd: Long
var loadEventEnd: Long
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public interface PerformanceNavigation { native public interface PerformanceNavigation {
var type: Short val type: Short
get() = noImpl get() = noImpl
set(value) = noImpl val redirectCount: Short
var redirectCount: Short
get() = noImpl get() = noImpl
set(value) = noImpl
companion object { companion object {
val TYPE_NAVIGATE: Short = 0 val TYPE_NAVIGATE: Short = 0
@@ -21,24 +21,19 @@ import org.w3c.performance.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public interface ServiceWorkerRegistration : EventTarget { native public interface ServiceWorkerRegistration : EventTarget {
var installing: ServiceWorker? val installing: ServiceWorker?
get() = noImpl get() = noImpl
set(value) = noImpl val waiting: ServiceWorker?
var waiting: ServiceWorker?
get() = noImpl get() = noImpl
set(value) = noImpl val active: ServiceWorker?
var active: ServiceWorker?
get() = noImpl get() = noImpl
set(value) = noImpl val scope: String
var scope: String
get() = noImpl get() = noImpl
set(value) = noImpl
var onupdatefound: ((Event) -> dynamic)? var onupdatefound: ((Event) -> dynamic)?
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var APISpace: dynamic val APISpace: dynamic
get() = noImpl get() = noImpl
set(value) = noImpl
fun update(): Unit = noImpl fun update(): Unit = noImpl
fun unregister(): dynamic = noImpl fun unregister(): dynamic = noImpl
fun methodName(of: dynamic): dynamic = noImpl fun methodName(of: dynamic): dynamic = noImpl
@@ -47,12 +42,10 @@ native public interface ServiceWorkerRegistration : EventTarget {
} }
native public interface ServiceWorkerGlobalScope : WorkerGlobalScope { native public interface ServiceWorkerGlobalScope : WorkerGlobalScope {
var clients: Clients val clients: Clients
get() = noImpl get() = noImpl
set(value) = noImpl val registration: ServiceWorkerRegistration
var registration: ServiceWorkerRegistration
get() = noImpl get() = noImpl
set(value) = noImpl
var oninstall: ((Event) -> dynamic)? var oninstall: ((Event) -> dynamic)?
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -75,15 +68,12 @@ native public interface ServiceWorkerGlobalScope : WorkerGlobalScope {
} }
native public interface ServiceWorker : EventTarget, UnionMessagePortOrServiceWorker, UnionClientOrMessagePortOrServiceWorker { native public interface ServiceWorker : EventTarget, UnionMessagePortOrServiceWorker, UnionClientOrMessagePortOrServiceWorker {
var scriptURL: String val scriptURL: String
get() = noImpl get() = noImpl
set(value) = noImpl val state: String
var state: String
get() = noImpl get() = noImpl
set(value) = noImpl val id: String
var id: String
get() = noImpl get() = noImpl
set(value) = noImpl
var onstatechange: ((Event) -> dynamic)? var onstatechange: ((Event) -> dynamic)?
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -94,12 +84,10 @@ native public interface ServiceWorker : EventTarget, UnionMessagePortOrServiceWo
} }
native public interface ServiceWorkerContainer : EventTarget { native public interface ServiceWorkerContainer : EventTarget {
var controller: ServiceWorker? val controller: ServiceWorker?
get() = noImpl get() = noImpl
set(value) = noImpl val ready: dynamic
var ready: dynamic
get() = noImpl get() = noImpl
set(value) = noImpl
var oncontrollerchange: ((Event) -> dynamic)? var oncontrollerchange: ((Event) -> dynamic)?
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -119,21 +107,16 @@ native public open class RegistrationOptions {
} }
native public open class ServiceWorkerMessageEvent(type: String, eventInitDict: ServiceWorkerMessageEventInit = noImpl) : Event(type, eventInitDict) { native public open class ServiceWorkerMessageEvent(type: String, eventInitDict: ServiceWorkerMessageEventInit = noImpl) : Event(type, eventInitDict) {
var data: Any? open val data: Any?
get() = noImpl get() = noImpl
set(value) = noImpl open val origin: String
var origin: String
get() = noImpl get() = noImpl
set(value) = noImpl open val lastEventId: String
var lastEventId: String
get() = noImpl get() = noImpl
set(value) = noImpl open val source: UnionMessagePortOrServiceWorker?
var source: UnionMessagePortOrServiceWorker?
get() = noImpl get() = noImpl
set(value) = noImpl open val ports: Array<MessagePort>?
var ports: Array<MessagePort>?
get() = noImpl get() = noImpl
set(value) = noImpl
fun initServiceWorkerMessageEvent(typeArg: String, canBubbleArg: Boolean, cancelableArg: Boolean, dataArg: Any?, originArg: String, lastEventIdArg: String, sourceArg: UnionMessagePortOrServiceWorker, portsArg: Array<MessagePort>?): Unit = noImpl fun initServiceWorkerMessageEvent(typeArg: String, canBubbleArg: Boolean, cancelableArg: Boolean, dataArg: Any?, originArg: String, lastEventIdArg: String, sourceArg: UnionMessagePortOrServiceWorker, portsArg: Array<MessagePort>?): Unit = noImpl
} }
@@ -146,25 +129,20 @@ native public open class ServiceWorkerMessageEventInit : EventInit() {
} }
native public interface Client : UnionClientOrMessagePortOrServiceWorker { native public interface Client : UnionClientOrMessagePortOrServiceWorker {
var url: String val url: String
get() = noImpl get() = noImpl
set(value) = noImpl val frameType: String
var frameType: String
get() = noImpl get() = noImpl
set(value) = noImpl val id: String
var id: String
get() = noImpl get() = noImpl
set(value) = noImpl
fun postMessage(message: Any?, transfer: Array<Transferable> = noImpl): Unit = noImpl fun postMessage(message: Any?, transfer: Array<Transferable> = noImpl): Unit = noImpl
} }
native public interface WindowClient : Client { native public interface WindowClient : Client {
var visibilityState: dynamic val visibilityState: dynamic
get() = noImpl get() = noImpl
set(value) = noImpl val focused: Boolean
var focused: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl
fun focus(): dynamic = noImpl fun focus(): dynamic = noImpl
} }
@@ -187,15 +165,12 @@ native public open class ExtendableEventInit : EventInit() {
} }
native public open class FetchEvent(type: String, eventInitDict: FetchEventInit = noImpl) : ExtendableEvent(type, eventInitDict) { native public open class FetchEvent(type: String, eventInitDict: FetchEventInit = noImpl) : ExtendableEvent(type, eventInitDict) {
var request: Request open val request: Request
get() = noImpl get() = noImpl
set(value) = noImpl open val client: Client
var client: Client
get() = noImpl get() = noImpl
set(value) = noImpl open val isReload: Boolean
var isReload: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl
fun respondWith(r: dynamic): Unit = noImpl fun respondWith(r: dynamic): Unit = noImpl
} }
@@ -206,21 +181,16 @@ native public open class FetchEventInit : ExtendableEventInit() {
} }
native public open class ExtendableMessageEvent(type: String, eventInitDict: ExtendableMessageEventInit = noImpl) : ExtendableEvent(type, eventInitDict) { native public open class ExtendableMessageEvent(type: String, eventInitDict: ExtendableMessageEventInit = noImpl) : ExtendableEvent(type, eventInitDict) {
var data: Any? open val data: Any?
get() = noImpl get() = noImpl
set(value) = noImpl open val origin: String
var origin: String
get() = noImpl get() = noImpl
set(value) = noImpl open val lastEventId: String
var lastEventId: String
get() = noImpl get() = noImpl
set(value) = noImpl open val source: UnionClientOrMessagePortOrServiceWorker?
var source: UnionClientOrMessagePortOrServiceWorker?
get() = noImpl get() = noImpl
set(value) = noImpl open val ports: Array<MessagePort>?
var ports: Array<MessagePort>?
get() = noImpl get() = noImpl
set(value) = noImpl
fun initExtendableMessageEvent(typeArg: String, canBubbleArg: Boolean, cancelableArg: Boolean, dataArg: Any?, originArg: String, lastEventIdArg: String, sourceArg: UnionClientOrMessagePortOrServiceWorker, portsArg: Array<MessagePort>?): Unit = noImpl fun initExtendableMessageEvent(typeArg: String, canBubbleArg: Boolean, cancelableArg: Boolean, dataArg: Any?, originArg: String, lastEventIdArg: String, sourceArg: UnionClientOrMessagePortOrServiceWorker, portsArg: Array<MessagePort>?): Unit = noImpl
} }
+11 -22
View File
@@ -51,39 +51,31 @@ native public open class XMLHttpRequest : XMLHttpRequestEventTarget {
var onreadystatechange: ((Event) -> dynamic)? var onreadystatechange: ((Event) -> dynamic)?
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var readyState: Short open val readyState: Short
get() = noImpl get() = noImpl
set(value) = noImpl
var timeout: Int var timeout: Int
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var withCredentials: Boolean var withCredentials: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var upload: XMLHttpRequestUpload open val upload: XMLHttpRequestUpload
get() = noImpl get() = noImpl
set(value) = noImpl open val responseURL: String
var responseURL: String
get() = noImpl get() = noImpl
set(value) = noImpl open val status: Short
var status: Short
get() = noImpl get() = noImpl
set(value) = noImpl open val statusText: String
var statusText: String
get() = noImpl get() = noImpl
set(value) = noImpl
var responseType: String var responseType: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
var response: Any? open val response: Any?
get() = noImpl get() = noImpl
set(value) = noImpl open val responseText: String
var responseText: String
get() = noImpl get() = noImpl
set(value) = noImpl open val responseXML: Document?
var responseXML: Document?
get() = noImpl get() = noImpl
set(value) = noImpl
fun open(method: String, url: String): Unit = noImpl fun open(method: String, url: String): Unit = noImpl
fun open(method: String, url: String, async: Boolean, username: String? = null, password: String? = null): Unit = noImpl fun open(method: String, url: String, async: Boolean, username: String? = null, password: String? = null): Unit = noImpl
fun setRequestHeader(name: String, value: String): Unit = noImpl fun setRequestHeader(name: String, value: String): Unit = noImpl
@@ -112,15 +104,12 @@ native public open class FormData(form: HTMLFormElement = noImpl) {
} }
native public open class ProgressEvent(type: String, eventInitDict: ProgressEventInit = noImpl) : Event(type, eventInitDict) { native public open class ProgressEvent(type: String, eventInitDict: ProgressEventInit = noImpl) : Event(type, eventInitDict) {
var lengthComputable: Boolean open val lengthComputable: Boolean
get() = noImpl get() = noImpl
set(value) = noImpl open val loaded: Long
var loaded: Long
get() = noImpl get() = noImpl
set(value) = noImpl open val total: Long
var total: Long
get() = noImpl get() = noImpl
set(value) = noImpl
} }
native public open class ProgressEventInit : EventInit() { native public open class ProgressEventInit : EventInit() {
@@ -421,6 +421,14 @@ class DefinitionVisitor(val extendedAttributes: List<ExtendedAttribute>, val nam
return defaultResult() return defaultResult()
} }
override fun visitReadonlyMemberRest(ctx: ReadonlyMemberRestContext?): Definition? {
readOnly = true
visitChildren(ctx)
readOnly = false
return defaultResult()
}
override fun visitStaticMember(ctx: WebIDLParser.StaticMemberContext): Definition { override fun visitStaticMember(ctx: WebIDLParser.StaticMemberContext): Definition {
static = true static = true
visitChildren(ctx) visitChildren(ctx)
@@ -8,11 +8,12 @@ private fun <O : Appendable> O.indent(level: Int) {
} }
} }
private fun Appendable.renderAttributeDeclaration(arg: GenerateAttribute, override: Boolean, level: Int = 1) { private fun Appendable.renderAttributeDeclaration(arg: GenerateAttribute, override: Boolean, open: Boolean, level: Int = 1) {
indent(level) indent(level)
if (override) { when {
append("override ") override -> append("override ")
open -> append("open ")
} }
append(if (arg.readOnly) "val" else "var") append(if (arg.readOnly) "val" else "var")
@@ -85,6 +86,12 @@ private fun Appendable.renderFunctionDeclaration(f: GenerateFunction, override:
appendln(": ${f.returnType.render()} = noImpl") appendln(": ${f.returnType.render()} = noImpl")
} }
private fun List<GenerateAttribute>.hasNoVars() = none { it.isVar }
private val GenerateAttribute.isVal: Boolean
get() = readOnly
private val GenerateAttribute.isVar: Boolean
get() = !readOnly
fun Appendable.render(allTypes: Map<String, GenerateTraitOrClass>, typeNamesToUnions: Map<String, List<String>>, iface: GenerateTraitOrClass, markerAnnotation: Boolean = false) { fun Appendable.render(allTypes: Map<String, GenerateTraitOrClass>, typeNamesToUnions: Map<String, List<String>>, iface: GenerateTraitOrClass, markerAnnotation: Boolean = false) {
append("native public ") append("native public ")
if (markerAnnotation) { if (markerAnnotation) {
@@ -130,11 +137,15 @@ fun Appendable.render(allTypes: Map<String, GenerateTraitOrClass>, typeNamesToUn
} }
val superAttributes = allSuperTypes.flatMap { it.memberAttributes }.distinct() val superAttributes = allSuperTypes.flatMap { it.memberAttributes }.distinct()
val superAttributesByName = superAttributes.groupBy { it.name }
val superFunctions = allSuperTypes.flatMap { it.memberFunctions }.distinct() val superFunctions = allSuperTypes.flatMap { it.memberFunctions }.distinct()
val superSignatures = superAttributes.map { it.signature } merge superFunctions.map { it.signature } val superSignatures = superAttributes.map { it.signature } merge superFunctions.map { it.signature }
iface.memberAttributes.filter { it !in superAttributes && !it.static }.map { it.dynamicIfUnknownType(allTypes.keySet()) }.groupBy { it.signature }.reduceValues().values().forEach { arg -> iface.memberAttributes
renderAttributeDeclaration(arg, arg.signature in superSignatures) .filter { it !in superAttributes && !it.static && (it.isVar || (it.isVal && superAttributesByName[it.name]?.hasNoVars() ?: true)) }
.map { it.dynamicIfUnknownType(allTypes.keySet()) }
.groupBy { it.signature }.reduceValues().values().forEach { arg ->
renderAttributeDeclaration(arg, override = arg.signature in superSignatures, open = iface.kind == GenerateDefinitionKind.CLASS && arg.readOnly)
} }
iface.memberFunctions.filter { it !in superFunctions && !it.static }.map { it.dynamicIfUnknownType(allTypes.keySet()) }.groupBy { it.signature }.reduceValues(::betterFunction).values().forEach { iface.memberFunctions.filter { it !in superFunctions && !it.static }.map { it.dynamicIfUnknownType(allTypes.keySet()) }.groupBy { it.signature }.reduceValues(::betterFunction).values().forEach {
renderFunctionDeclaration(it, it.signature in superSignatures) renderFunctionDeclaration(it, it.signature in superSignatures)
@@ -148,10 +159,10 @@ fun Appendable.render(allTypes: Map<String, GenerateTraitOrClass>, typeNamesToUn
indent(1) indent(1)
appendln("companion object {") appendln("companion object {")
iface.constants.forEach { iface.constants.forEach {
renderAttributeDeclaration(it, override = false, level = 2) renderAttributeDeclaration(it, override = false, open = false, level = 2)
} }
staticAttributes.forEach { staticAttributes.forEach {
renderAttributeDeclaration(it, override = false, level = 2) renderAttributeDeclaration(it, override = false, open = false, level = 2)
} }
staticFunctions.forEach { staticFunctions.forEach {
renderFunctionDeclaration(it, override = false, level = 2) renderFunctionDeclaration(it, override = false, level = 2)