Get rid of deprecated annotations and modifiers in js-stdlib

This commit is contained in:
Denis Zharkov
2015-09-14 16:36:37 +03:00
parent 5cecaa6f87
commit 05eaf37123
44 changed files with 1484 additions and 1484 deletions
+8 -8
View File
@@ -18,32 +18,32 @@ package kotlin.js
import kotlin.annotation.AnnotationTarget.* import kotlin.annotation.AnnotationTarget.*
native @native
@Target(CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, VALUE_PARAMETER) @Target(CLASS, FUNCTION, PROPERTY, CONSTRUCTOR, VALUE_PARAMETER)
public annotation class native(public val name: String = "") public annotation class native(public val name: String = "")
native @native
@Target(FUNCTION) @Target(FUNCTION)
public annotation class nativeGetter public annotation class nativeGetter
native @native
@Target(FUNCTION) @Target(FUNCTION)
public annotation class nativeSetter public annotation class nativeSetter
native @native
@Target(FUNCTION) @Target(FUNCTION)
public annotation class nativeInvoke public annotation class nativeInvoke
native @native
@Target(CLASS, FUNCTION, PROPERTY) @Target(CLASS, FUNCTION, PROPERTY)
public annotation class library(public val name: String = "") public annotation class library(public val name: String = "")
native @native
@Target(PROPERTY) @Target(PROPERTY)
public annotation class enumerable() public annotation class enumerable()
// TODO make it "internal" or "fake" // TODO make it "internal" or "fake"
native @native
@Target(CLASS) @Target(CLASS)
deprecated("Do not use this annotation: it is for internal use only") @Deprecated("Do not use this annotation: it is for internal use only")
public annotation class marker public annotation class marker
+2 -2
View File
@@ -19,6 +19,6 @@ package kotlin
// actually \s is enough to match all whitespace, but \xA0 added because of different regexp behavior of Rhino used in Selenium tests // actually \s is enough to match all whitespace, but \xA0 added because of different regexp behavior of Rhino used in Selenium tests
public fun Char.isWhitespace(): Boolean = toString().matches("[\\s\\xA0]") public fun Char.isWhitespace(): Boolean = toString().matches("[\\s\\xA0]")
native public fun Char.toLowerCase(): Char = noImpl @native public fun Char.toLowerCase(): Char = noImpl
native public fun Char.toUpperCase(): Char = noImpl @native public fun Char.toUpperCase(): Char = noImpl
+3 -3
View File
@@ -23,14 +23,14 @@ import kotlin.InlineOption.ONLY_LOCAL_RETURN
// so they annotated as 'native' to avoid warnings/errors from some minifiers. // so they annotated as 'native' to avoid warnings/errors from some minifiers.
// They was reserved word in ECMAScript 2, but is not since ECMAScript 5. // They was reserved word in ECMAScript 2, but is not since ECMAScript 5.
native @native
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FIELD) @Target(AnnotationTarget.PROPERTY, AnnotationTarget.FIELD)
@Retention(AnnotationRetention.SOURCE) @Retention(AnnotationRetention.SOURCE)
public annotation class volatile public annotation class volatile
native @native
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER) @Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
@Retention(AnnotationRetention.SOURCE) @Retention(AnnotationRetention.SOURCE)
public annotation class synchronized public annotation class synchronized
public inline fun <R> synchronized(lock: Any, @inlineOptions(ONLY_LOCAL_RETURN) block: () -> R): R = block() public inline fun <R> synchronized(lock: Any, crossinline block: () -> R): R = block()
+13 -13
View File
@@ -2,37 +2,37 @@ package kotlin.js
import java.util.*; import java.util.*;
native @native
public val <T> noImpl: T = throw Exception() public val <T> noImpl: T = throw Exception()
native @native
public fun eval(expr: String): dynamic = noImpl public fun eval(expr: String): dynamic = noImpl
native @native
public fun typeof(a: Any?): String = noImpl public fun typeof(a: Any?): String = noImpl
native @native
public val undefined: Nothing? = noImpl public val undefined: Nothing? = noImpl
// Drop this after KT-2093 will be fixed and restore MutableMap.set in Maps.kt from MapsJVM.kt // Drop this after KT-2093 will be fixed and restore MutableMap.set in Maps.kt from MapsJVM.kt
/** Provides [] access to maps */ /** Provides [] access to maps */
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND") @Suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
native public fun <K, V> MutableMap<K, V>.set(key: K, value: V): V? = noImpl @native public fun <K, V> MutableMap<K, V>.set(key: K, value: V): V? = noImpl
library @library
public fun println() {} public fun println() {}
library @library
public fun println(s : Any?) {} public fun println(s : Any?) {}
library @library
public fun print(s : Any?) {} public fun print(s : Any?) {}
//TODO: consistent parseInt //TODO: consistent parseInt
native @native
public fun parseInt(s: String, radix: Int = 10): Int = noImpl public fun parseInt(s: String, radix: Int = 10): Int = noImpl
library @library
public fun safeParseInt(s : String) : Int? = noImpl public fun safeParseInt(s : String) : Int? = noImpl
library @library
public fun safeParseDouble(s : String) : Double? = noImpl public fun safeParseDouble(s : String) : Double? = noImpl
native @native
public fun js(code: String): dynamic = noImpl public fun js(code: String): dynamic = noImpl
+1 -1
View File
@@ -1,6 +1,6 @@
package kotlin.js package kotlin.js
native @native
public class Date() { public class Date() {
public fun getTime() : Int = noImpl public fun getTime() : Int = noImpl
} }
+7 -7
View File
@@ -1,13 +1,13 @@
package kotlin.js package kotlin.js
// https://developer.mozilla.org/en/DOM/console // https://developer.mozilla.org/en/DOM/console
native public trait Console { @native public trait Console {
native public fun dir(o: Any): Unit = noImpl @native public fun dir(o: Any): Unit = noImpl
native public fun error(vararg o: Any?): Unit = noImpl @native public fun error(vararg o: Any?): Unit = noImpl
native public fun info(vararg o: Any?): Unit = noImpl @native public fun info(vararg o: Any?): Unit = noImpl
native public fun log(vararg o: Any?): Unit = noImpl @native public fun log(vararg o: Any?): Unit = noImpl
native public fun warn(vararg o: Any?): Unit = noImpl @native public fun warn(vararg o: Any?): Unit = noImpl
} }
native @native
public val console: Console = noImpl public val console: Console = noImpl
+2 -2
View File
@@ -1,6 +1,6 @@
package org.w3c.dom.views package org.w3c.dom.views
deprecated("Use declarations from org.w3c.dom instead") @Deprecated("Use declarations from org.w3c.dom instead")
native public trait AbstractView { @native public trait AbstractView {
} }
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,9 +1,9 @@
package java.io package java.io
library @library
public class IOException(message: String = "") : Exception() {} public class IOException(message: String = "") : Exception() {}
library @library
public trait Closeable { public trait Closeable {
public open fun close() : Unit; public open fun close() : Unit;
} }
+12 -12
View File
@@ -1,33 +1,33 @@
package java.lang package java.lang
library @library
open public class Error(message: String? = null): Throwable(message) {} open public class Error(message: String? = null): Throwable(message) {}
library @library
open public class Exception(message: String? = null): Throwable(message) {} open public class Exception(message: String? = null): Throwable(message) {}
library @library
open public class RuntimeException(message: String? = null) : Exception(message) {} open public class RuntimeException(message: String? = null) : Exception(message) {}
library @library
public class IllegalArgumentException(message: String? = null) : RuntimeException(message) {} public class IllegalArgumentException(message: String? = null) : RuntimeException(message) {}
library @library
public class IllegalStateException(message: String? = null) : RuntimeException(message) {} public class IllegalStateException(message: String? = null) : RuntimeException(message) {}
library @library
public class IndexOutOfBoundsException(message: String? = null) : RuntimeException(message) {} public class IndexOutOfBoundsException(message: String? = null) : RuntimeException(message) {}
library @library
public class UnsupportedOperationException(message: String? = null) : RuntimeException(message) {} public class UnsupportedOperationException(message: String? = null) : RuntimeException(message) {}
library @library
public class NumberFormatException(message: String? = null) : RuntimeException(message) {} public class NumberFormatException(message: String? = null) : RuntimeException(message) {}
library @library
public class NullPointerException(message: String? = null) : RuntimeException(message) {} public class NullPointerException(message: String? = null) : RuntimeException(message) {}
library @library
public trait Runnable { public trait Runnable {
public open fun run() : Unit; public open fun run() : Unit;
} }
@@ -36,14 +36,14 @@ public fun Runnable(action: () -> Unit): Runnable = object : Runnable {
override fun run() = action() override fun run() = action()
} }
library @library
public trait Appendable { public trait Appendable {
public open fun append(csq: CharSequence?): Appendable public open fun append(csq: CharSequence?): Appendable
public open fun append(csq: CharSequence?, start: Int, end: Int): Appendable public open fun append(csq: CharSequence?, start: Int, end: Int): Appendable
public open fun append(c: Char): Appendable public open fun append(c: Char): Appendable
} }
library @library
public class StringBuilder(capacity: Int? = null) : Appendable { public class StringBuilder(capacity: Int? = null) : Appendable {
override fun append(c: Char): StringBuilder = noImpl override fun append(c: Char): StringBuilder = noImpl
override fun append(csq: CharSequence?): StringBuilder = noImpl override fun append(csq: CharSequence?): StringBuilder = noImpl
+21 -21
View File
@@ -1,17 +1,17 @@
package java.util package java.util
native @native
private val DEFAULT_INITIAL_CAPACITY = 16 private val DEFAULT_INITIAL_CAPACITY = 16
native @native
private val DEFAULT_LOAD_FACTOR = 0.75f private val DEFAULT_LOAD_FACTOR = 0.75f
library @library
public trait Comparator<T> { public trait Comparator<T> {
public fun compare(obj1: T, obj2: T): Int; public fun compare(obj1: T, obj2: T): Int;
} }
library @library
public abstract class AbstractCollection<E>() : MutableCollection<E> { public abstract class AbstractCollection<E>() : MutableCollection<E> {
override fun isEmpty(): Boolean = noImpl override fun isEmpty(): Boolean = noImpl
override fun contains(o: Any?): Boolean = noImpl override fun contains(o: Any?): Boolean = noImpl
@@ -32,7 +32,7 @@ public abstract class AbstractCollection<E>() : MutableCollection<E> {
override fun equals(other: Any?): Boolean = noImpl override fun equals(other: Any?): Boolean = noImpl
} }
library @library
public abstract class AbstractList<E>() : AbstractCollection<E>(), MutableList<E> { public abstract class AbstractList<E>() : AbstractCollection<E>(), MutableList<E> {
abstract override fun get(index: Int): E abstract override fun get(index: Int): E
override fun set(index: Int, element: E): E = noImpl override fun set(index: Int, element: E): E = noImpl
@@ -58,59 +58,59 @@ public abstract class AbstractList<E>() : AbstractCollection<E>(), MutableList<E
override fun toString(): String = noImpl override fun toString(): String = noImpl
} }
library @library
public open class ArrayList<E>(capacity: Int = 0) : AbstractList<E>() { public open class ArrayList<E>(capacity: Int = 0) : AbstractList<E>() {
override fun get(index: Int): E = noImpl override fun get(index: Int): E = noImpl
override fun size(): Int = noImpl override fun size(): Int = noImpl
} }
library @library
public open class LinkedList<E>() : AbstractList<E>() { public open class LinkedList<E>() : AbstractList<E>() {
override fun get(index: Int): E = noImpl override fun get(index: Int): E = noImpl
override fun set(index: Int, element: E): E = noImpl override fun set(index: Int, element: E): E = noImpl
override fun add(index: Int, element: E): Unit = noImpl override fun add(index: Int, element: E): Unit = noImpl
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND") @Suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
public fun poll(): E? = noImpl public fun poll(): E? = noImpl
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND") @Suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
public fun peek(): E? = noImpl public fun peek(): E? = noImpl
public fun offer(e: E): Boolean = noImpl public fun offer(e: E): Boolean = noImpl
} }
library @library
public open class HashSet<E>( public open class HashSet<E>(
initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR
) : AbstractCollection<E>(), MutableSet<E> { ) : AbstractCollection<E>(), MutableSet<E> {
override fun size(): Int = noImpl override fun size(): Int = noImpl
} }
library @library
public trait SortedSet<E> : Set<E> { public trait SortedSet<E> : Set<E> {
} }
library @library
public open class TreeSet<E>() : AbstractCollection<E>(), MutableSet<E>, SortedSet<E> { public open class TreeSet<E>() : AbstractCollection<E>(), MutableSet<E>, SortedSet<E> {
override fun size(): Int = noImpl override fun size(): Int = noImpl
} }
library @library
public open class LinkedHashSet<E>( public open class LinkedHashSet<E>(
initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR
) : HashSet<E>(initialCapacity, loadFactor), MutableSet<E> { ) : HashSet<E>(initialCapacity, loadFactor), MutableSet<E> {
override fun size(): Int = noImpl override fun size(): Int = noImpl
} }
library @library
public open class HashMap<K, V>(initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR) : MutableMap<K, V> { public open class HashMap<K, V>(initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR) : MutableMap<K, V> {
override fun size(): Int = noImpl override fun size(): Int = noImpl
override fun isEmpty(): Boolean = noImpl override fun isEmpty(): Boolean = noImpl
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND") @Suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
override fun get(key: Any?): V? = noImpl override fun get(key: Any?): V? = noImpl
override fun containsKey(key: Any?): Boolean = noImpl override fun containsKey(key: Any?): Boolean = noImpl
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND") @Suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
override fun put(key: K, value: V): V? = noImpl override fun put(key: K, value: V): V? = noImpl
override fun putAll(m: Map<out K, V>): Unit = noImpl override fun putAll(m: Map<out K, V>): Unit = noImpl
@suppress("BASE_WITH_NULLABLE_UPPER_BOUND") @Suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
override fun remove(key: Any?): V? = noImpl override fun remove(key: Any?): V? = noImpl
override fun clear(): Unit = noImpl override fun clear(): Unit = noImpl
override fun containsValue(value: Any?): Boolean = noImpl override fun containsValue(value: Any?): Boolean = noImpl
@@ -119,21 +119,21 @@ public open class HashMap<K, V>(initialCapacity: Int = DEFAULT_INITIAL_CAPACITY,
override fun entrySet(): MutableSet<MutableMap.MutableEntry<K, V>> = noImpl override fun entrySet(): MutableSet<MutableMap.MutableEntry<K, V>> = noImpl
} }
library @library
public open class LinkedHashMap<K, V>( public open class LinkedHashMap<K, V>(
initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR, accessOrder: Boolean = false initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR, accessOrder: Boolean = false
) : HashMap<K, V>(initialCapacity, loadFactor) ) : HashMap<K, V>(initialCapacity, loadFactor)
library @library
public open class NoSuchElementException(message: String? = null) : Exception() {} public open class NoSuchElementException(message: String? = null) : Exception() {}
library @library
public trait Enumeration<E> { public trait Enumeration<E> {
public fun hasMoreElements(): Boolean public fun hasMoreElements(): Boolean
public fun nextElement(): E public fun nextElement(): E
} }
native @native
public class Date() { public class Date() {
public fun getTime(): Int = noImpl public fun getTime(): Int = noImpl
} }
@@ -3,11 +3,11 @@ package java.util.Collections
import java.lang.* import java.lang.*
import java.util.* import java.util.*
library("collectionsMax") @library("collectionsMax")
public fun max<T>(col : Collection<T>, comp : Comparator<in T>) : T = noImpl public fun max<T>(col : Collection<T>, comp : Comparator<in T>) : T = noImpl
library("collectionsSort") @library("collectionsSort")
public fun <T> sort(list: MutableList<T>): Unit = noImpl public fun <T> sort(list: MutableList<T>): Unit = noImpl
library("collectionsSort") @library("collectionsSort")
public fun <T> sort(list: MutableList<T>, comparator: java.util.Comparator<in T>): Unit = noImpl public fun <T> sort(list: MutableList<T>, comparator: java.util.Comparator<in T>): Unit = noImpl
+4 -4
View File
@@ -1,6 +1,6 @@
package kotlin.js package kotlin.js
native public class Json() { @native public class Json() {
public fun get(propertyName: String): Any? = noImpl public fun get(propertyName: String): Any? = noImpl
public fun set(propertyName: String, value: Any?): Unit = noImpl public fun set(propertyName: String, value: Any?): Unit = noImpl
} }
@@ -13,10 +13,10 @@ public fun json(vararg pairs: Pair<String, Any?>): Json {
return res return res
} }
library("jsonAddProperties") @library("jsonAddProperties")
public fun Json.add(other: Json): Json = noImpl public fun Json.add(other: Json): Json = noImpl
native @native
public trait JsonClass { public trait JsonClass {
public fun stringify(o: Any): String public fun stringify(o: Any): String
public fun stringify(o: Any, replacer: (key: String, value: Any?)->Any?): String public fun stringify(o: Any, replacer: (key: String, value: Any?)->Any?): String
@@ -30,5 +30,5 @@ public trait JsonClass {
public fun parse<T>(text: String, reviver: ((key: String, value: Any?)->Any?)): T public fun parse<T>(text: String, reviver: ((key: String, value: Any?)->Any?)): T
} }
native @native
public val JSON: JsonClass = noImpl public val JSON: JsonClass = noImpl
+10 -10
View File
@@ -2,36 +2,36 @@ package kotlin
import java.util.* import java.util.*
library @library
public fun <T> arrayOf(vararg value : T): Array<T> = noImpl public fun <T> arrayOf(vararg value : T): Array<T> = noImpl
// "constructors" for primitive types array // "constructors" for primitive types array
library @library
public fun doubleArrayOf(vararg content : Double): DoubleArray = noImpl public fun doubleArrayOf(vararg content : Double): DoubleArray = noImpl
library @library
public fun floatArrayOf(vararg content : Float): FloatArray = noImpl public fun floatArrayOf(vararg content : Float): FloatArray = noImpl
library @library
public fun longArrayOf(vararg content : Long): LongArray = noImpl public fun longArrayOf(vararg content : Long): LongArray = noImpl
library @library
public fun intArrayOf(vararg content : Int): IntArray = noImpl public fun intArrayOf(vararg content : Int): IntArray = noImpl
library @library
public fun charArrayOf(vararg content : Char): CharArray = noImpl public fun charArrayOf(vararg content : Char): CharArray = noImpl
library @library
public fun shortArrayOf(vararg content : Short): ShortArray = noImpl public fun shortArrayOf(vararg content : Short): ShortArray = noImpl
library @library
public fun byteArrayOf(vararg content : Byte): ByteArray = noImpl public fun byteArrayOf(vararg content : Byte): ByteArray = noImpl
library @library
public fun booleanArrayOf(vararg content : Boolean): BooleanArray = noImpl public fun booleanArrayOf(vararg content : Boolean): BooleanArray = noImpl
library("copyToArray") @library("copyToArray")
public fun <reified T> Collection<T>.toTypedArray(): Array<T> = noImpl public fun <reified T> Collection<T>.toTypedArray(): Array<T> = noImpl
+2 -2
View File
@@ -1,7 +1,7 @@
package kotlin.js package kotlin.js
//TODO: declare using number //TODO: declare using number
native @native
public class MathClass() { public class MathClass() {
public val PI : Double = noImpl; public val PI : Double = noImpl;
public fun random() : Double = noImpl; public fun random() : Double = noImpl;
@@ -26,5 +26,5 @@ public class MathClass() {
public fun ceil(value : Number) : Int = noImpl public fun ceil(value : Number) : Int = noImpl
} }
native @native
public val Math: MathClass = MathClass(); public val Math: MathClass = MathClass();
+2 -2
View File
@@ -17,7 +17,7 @@
package kotlin.text.js package kotlin.text.js
native public class RegExp(pattern: String, flags: String? = null) { @native public class RegExp(pattern: String, flags: String? = null) {
public fun test(str: String): Boolean = noImpl public fun test(str: String): Boolean = noImpl
@@ -40,7 +40,7 @@ public fun RegExp.reset() {
} }
native public trait RegExpMatch { @native public trait RegExpMatch {
public val index: Int public val index: Int
public val input: String public val input: String
} }
+1 -1
View File
@@ -17,7 +17,7 @@
package kotlin package kotlin
private class ConstrainedOnceSequence<T>(sequence: Sequence<T>) : Sequence<T> { private class ConstrainedOnceSequence<T>(sequence: Sequence<T>) : Sequence<T> {
private volatile var sequenceRef: Sequence<T>? = sequence @volatile private var sequenceRef: Sequence<T>? = sequence
//private val lock = Any() //private val lock = Any()
//TODO: Synchronize with the synchonized() method //TODO: Synchronize with the synchonized() method
+16 -16
View File
@@ -3,46 +3,46 @@ package kotlin
import kotlin.text.js.RegExp import kotlin.text.js.RegExp
native public fun String.toUpperCase() : String = noImpl @native public fun String.toUpperCase() : String = noImpl
native public fun String.toLowerCase() : String = noImpl @native public fun String.toLowerCase() : String = noImpl
native("indexOf") @native("indexOf")
internal fun String.nativeIndexOf(str : String, fromIndex : Int) : Int = noImpl internal fun String.nativeIndexOf(str : String, fromIndex : Int) : Int = noImpl
native("lastIndexOf") @native("lastIndexOf")
internal fun String.nativeLastIndexOf(str : String, fromIndex : Int) : Int = noImpl internal fun String.nativeLastIndexOf(str : String, fromIndex : Int) : Int = noImpl
native("startsWith") @native("startsWith")
internal fun String.nativeStartsWith(s: String, position: Int): Boolean = noImpl internal fun String.nativeStartsWith(s: String, position: Int): Boolean = noImpl
native("endsWith") @native("endsWith")
internal fun String.nativeEndsWith(s: String): Boolean = noImpl internal fun String.nativeEndsWith(s: String): Boolean = noImpl
deprecated("Use split(Regex) instead.", ReplaceWith("split(regex.toRegex()).toTypedArray()")) @Deprecated("Use split(Regex) instead.", ReplaceWith("split(regex.toRegex()).toTypedArray()"))
library("splitString") @library("splitString")
public fun String.splitWithRegex(regex: String): Array<String> = noImpl public fun String.splitWithRegex(regex: String): Array<String> = noImpl
deprecated("Use split(Regex) instead.", ReplaceWith("split(regex.toRegex(), limit = limit).toTypedArray()")) @Deprecated("Use split(Regex) instead.", ReplaceWith("split(regex.toRegex(), limit = limit).toTypedArray()"))
library("splitString") @library("splitString")
public fun String.splitWithRegex(regex: String, limit: Int): Array<String> = noImpl public fun String.splitWithRegex(regex: String, limit: Int): Array<String> = noImpl
native public fun String.substring(beginIndex : Int) : String = noImpl @native public fun String.substring(beginIndex : Int) : String = noImpl
native public fun String.substring(beginIndex : Int, endIndex : Int) : String = noImpl @native public fun String.substring(beginIndex : Int, endIndex : Int) : String = noImpl
native public fun String.concat(str : String) : String = noImpl @native public fun String.concat(str : String) : String = noImpl
native public fun String.match(regex : String) : Array<String> = noImpl @native public fun String.match(regex : String) : Array<String> = noImpl
//native public fun String.trim() : String = noImpl //native public fun String.trim() : String = noImpl
//TODO: String.replace to implement effective trimLeading and trimTrailing //TODO: String.replace to implement effective trimLeading and trimTrailing
native("length") @native("length")
public val CharSequence.size: Int get() = noImpl public val CharSequence.size: Int get() = noImpl
native("replace") @native("replace")
internal fun String.nativeReplace(pattern: RegExp, replacement: String): String = noImpl internal fun String.nativeReplace(pattern: RegExp, replacement: String): String = noImpl
+1 -1
View File
@@ -89,7 +89,7 @@ public fun String.replace(oldValue: String, newValue: String, ignoreCase: Boolea
public fun String.replace(oldChar: Char, newChar: Char, ignoreCase: Boolean = false): String = public fun String.replace(oldChar: Char, newChar: Char, ignoreCase: Boolean = false): String =
nativeReplace(RegExp(Regex.escape(oldChar.toString()), if (ignoreCase) "gi" else "g"), newChar.toString()) nativeReplace(RegExp(Regex.escape(oldChar.toString()), if (ignoreCase) "gi" else "g"), newChar.toString())
deprecated("Use replaceFirst(String, String) instead.", ReplaceWith("replaceFirst(oldValue, newValue, ignoreCase = ignoreCase)")) @Deprecated("Use replaceFirst(String, String) instead.", ReplaceWith("replaceFirst(oldValue, newValue, ignoreCase = ignoreCase)"))
public fun String.replaceFirstLiteral(oldValue: String, newValue: String, ignoreCase: Boolean = false): String = public fun String.replaceFirstLiteral(oldValue: String, newValue: String, ignoreCase: Boolean = false): String =
nativeReplace(RegExp(Regex.escape(oldValue), if (ignoreCase) "i" else ""), Regex.escapeReplacement(newValue)) nativeReplace(RegExp(Regex.escape(oldValue), if (ignoreCase) "i" else ""), Regex.escapeReplacement(newValue))
@@ -20,7 +20,7 @@ import org.w3c.performance.*
import org.w3c.workers.* import org.w3c.workers.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public interface WebGLContextAttributes { @native public interface WebGLContextAttributes {
var alpha: Boolean var alpha: Boolean
var depth: Boolean var depth: Boolean
var stencil: Boolean var stencil: Boolean
@@ -31,7 +31,7 @@ native public interface WebGLContextAttributes {
var failIfMajorPerformanceCaveat: Boolean var failIfMajorPerformanceCaveat: Boolean
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun WebGLContextAttributes(alpha: Boolean = true, depth: Boolean = true, stencil: Boolean = false, antialias: Boolean = true, premultipliedAlpha: Boolean = true, preserveDrawingBuffer: Boolean = false, preferLowPowerToHighPerformance: Boolean = false, failIfMajorPerformanceCaveat: Boolean = false): WebGLContextAttributes { public inline fun WebGLContextAttributes(alpha: Boolean = true, depth: Boolean = true, stencil: Boolean = false, antialias: Boolean = true, premultipliedAlpha: Boolean = true, preserveDrawingBuffer: Boolean = false, preferLowPowerToHighPerformance: Boolean = false, failIfMajorPerformanceCaveat: Boolean = false): WebGLContextAttributes {
val o = js("({})") val o = js("({})")
@@ -47,31 +47,31 @@ public inline fun WebGLContextAttributes(alpha: Boolean = true, depth: Boolean =
return o return o
} }
native public interface WebGLObject { @native public interface WebGLObject {
} }
native public interface WebGLBuffer : WebGLObject { @native public interface WebGLBuffer : WebGLObject {
} }
native public interface WebGLFramebuffer : WebGLObject { @native public interface WebGLFramebuffer : WebGLObject {
} }
native public interface WebGLProgram : WebGLObject { @native public interface WebGLProgram : WebGLObject {
} }
native public interface WebGLRenderbuffer : WebGLObject { @native public interface WebGLRenderbuffer : WebGLObject {
} }
native public interface WebGLShader : WebGLObject { @native public interface WebGLShader : WebGLObject {
} }
native public interface WebGLTexture : WebGLObject { @native public interface WebGLTexture : WebGLObject {
} }
native public interface WebGLUniformLocation { @native public interface WebGLUniformLocation {
} }
native public interface WebGLActiveInfo { @native public interface WebGLActiveInfo {
val size: Int val size: Int
get() = noImpl get() = noImpl
val type: Int val type: Int
@@ -80,7 +80,7 @@ native public interface WebGLActiveInfo {
get() = noImpl get() = noImpl
} }
native public interface WebGLShaderPrecisionFormat { @native public interface WebGLShaderPrecisionFormat {
val rangeMin: Int val rangeMin: Int
get() = noImpl get() = noImpl
val rangeMax: Int val rangeMax: Int
@@ -89,7 +89,7 @@ native public interface WebGLShaderPrecisionFormat {
get() = noImpl get() = noImpl
} }
native public interface WebGLRenderingContext : RenderingContext { @native public interface WebGLRenderingContext : RenderingContext {
val canvas: HTMLCanvasElement val canvas: HTMLCanvasElement
get() = noImpl get() = noImpl
val drawingBufferWidth: Int val drawingBufferWidth: Int
@@ -552,16 +552,16 @@ 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) {
open val statusMessage: String open val statusMessage: String
get() = noImpl get() = noImpl
} }
native public interface WebGLContextEventInit : EventInit { @native public interface WebGLContextEventInit : EventInit {
var statusMessage: String var statusMessage: String
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun WebGLContextEventInit(statusMessage: String, bubbles: Boolean = false, cancelable: Boolean = false): WebGLContextEventInit { public inline fun WebGLContextEventInit(statusMessage: String, bubbles: Boolean = false, cancelable: Boolean = false): WebGLContextEventInit {
val o = js("({})") val o = js("({})")
@@ -572,7 +572,7 @@ public inline fun WebGLContextEventInit(statusMessage: String, bubbles: Boolean
return o return o
} }
native public open class ArrayBuffer(length: Int) : Transferable { @native public open class ArrayBuffer(length: Int) : Transferable {
open val byteLength: Int open val byteLength: Int
get() = noImpl get() = noImpl
fun slice(begin: Int, end: Int = noImpl): ArrayBuffer = noImpl fun slice(begin: Int, end: Int = noImpl): ArrayBuffer = noImpl
@@ -582,7 +582,7 @@ native public open class ArrayBuffer(length: Int) : Transferable {
} }
} }
native public open class Int8Array : ArrayBufferView { @native public open class Int8Array : ArrayBufferView {
constructor(length: Int) constructor(length: Int)
constructor(array: Int8Array) constructor(array: Int8Array)
constructor(array: Array<Byte>) constructor(array: Array<Byte>)
@@ -606,7 +606,7 @@ native public open class Int8Array : ArrayBufferView {
} }
} }
native public open class Uint8Array : ArrayBufferView { @native public open class Uint8Array : ArrayBufferView {
constructor(length: Int) constructor(length: Int)
constructor(array: Uint8Array) constructor(array: Uint8Array)
constructor(array: Array<Byte>) constructor(array: Array<Byte>)
@@ -630,7 +630,7 @@ native public open class Uint8Array : ArrayBufferView {
} }
} }
native public open class Uint8ClampedArray : ArrayBufferView { @native public open class Uint8ClampedArray : ArrayBufferView {
constructor(length: Int) constructor(length: Int)
constructor(array: Uint8ClampedArray) constructor(array: Uint8ClampedArray)
constructor(array: Array<Byte>) constructor(array: Array<Byte>)
@@ -654,7 +654,7 @@ native public open class Uint8ClampedArray : ArrayBufferView {
} }
} }
native public open class Int16Array : ArrayBufferView { @native public open class Int16Array : ArrayBufferView {
constructor(length: Int) constructor(length: Int)
constructor(array: Int16Array) constructor(array: Int16Array)
constructor(array: Array<Short>) constructor(array: Array<Short>)
@@ -678,7 +678,7 @@ native public open class Int16Array : ArrayBufferView {
} }
} }
native public open class Uint16Array : ArrayBufferView { @native public open class Uint16Array : ArrayBufferView {
constructor(length: Int) constructor(length: Int)
constructor(array: Uint16Array) constructor(array: Uint16Array)
constructor(array: Array<Short>) constructor(array: Array<Short>)
@@ -702,7 +702,7 @@ native public open class Uint16Array : ArrayBufferView {
} }
} }
native public open class Int32Array : ArrayBufferView { @native public open class Int32Array : ArrayBufferView {
constructor(length: Int) constructor(length: Int)
constructor(array: Int32Array) constructor(array: Int32Array)
constructor(array: Array<Int>) constructor(array: Array<Int>)
@@ -726,7 +726,7 @@ native public open class Int32Array : ArrayBufferView {
} }
} }
native public open class Uint32Array : ArrayBufferView { @native public open class Uint32Array : ArrayBufferView {
constructor(length: Int) constructor(length: Int)
constructor(array: Uint32Array) constructor(array: Uint32Array)
constructor(array: Array<Int>) constructor(array: Array<Int>)
@@ -750,7 +750,7 @@ native public open class Uint32Array : ArrayBufferView {
} }
} }
native public open class Float32Array : ArrayBufferView { @native public open class Float32Array : ArrayBufferView {
constructor(length: Int) constructor(length: Int)
constructor(array: Float32Array) constructor(array: Float32Array)
constructor(array: Array<Float>) constructor(array: Array<Float>)
@@ -774,7 +774,7 @@ native public open class Float32Array : ArrayBufferView {
} }
} }
native public open class Float64Array : ArrayBufferView { @native public open class Float64Array : ArrayBufferView {
constructor(length: Int) constructor(length: Int)
constructor(array: Float64Array) constructor(array: Float64Array)
constructor(array: Array<Double>) constructor(array: Array<Double>)
@@ -798,7 +798,7 @@ 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 {
open val buffer: ArrayBuffer open val buffer: ArrayBuffer
get() = noImpl get() = noImpl
open val byteOffset: Int open val byteOffset: Int
@@ -20,7 +20,7 @@ import org.w3c.performance.*
import org.w3c.workers.* import org.w3c.workers.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public interface CSSStyleDeclaration { @native public interface CSSStyleDeclaration {
var cssText: String var cssText: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -707,7 +707,7 @@ native public interface CSSStyleDeclaration {
get() = noImpl get() = noImpl
set(value) = 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 getPropertyValue(property: String): String = noImpl fun getPropertyValue(property: String): String = noImpl
fun getPropertyPriority(property: String): String = noImpl fun getPropertyPriority(property: String): String = noImpl
fun setProperty(property: String, value: String, priority: String = ""): Unit = noImpl fun setProperty(property: String, value: String, priority: String = ""): Unit = noImpl
@@ -716,19 +716,19 @@ native public interface CSSStyleDeclaration {
fun removeProperty(property: String): String = noImpl fun removeProperty(property: String): String = noImpl
} }
native public interface MediaList { @native public interface MediaList {
var mediaText: String var mediaText: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
val length: Int val length: Int
get() = noImpl get() = 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
fun deleteMedium(medium: String): Unit = noImpl fun deleteMedium(medium: String): Unit = noImpl
} }
native public interface StyleSheet { @native public interface StyleSheet {
val type: String val type: String
get() = noImpl get() = noImpl
val href: String? val href: String?
@@ -746,7 +746,7 @@ native public interface StyleSheet {
set(value) = noImpl set(value) = noImpl
} }
native public interface CSSStyleSheet : StyleSheet { @native public interface CSSStyleSheet : StyleSheet {
val ownerRule: CSSRule? val ownerRule: CSSRule?
get() = noImpl get() = noImpl
val cssRules: CSSRuleList val cssRules: CSSRuleList
@@ -755,21 +755,21 @@ native public interface CSSStyleSheet : StyleSheet {
fun deleteRule(index: Int): Unit = noImpl fun deleteRule(index: Int): Unit = noImpl
} }
native public interface StyleSheetList { @native public interface StyleSheetList {
val length: Int val length: Int
get() = noImpl get() = 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 {
val length: Int val length: Int
get() = noImpl get() = 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 {
val type: Short val type: Short
get() = noImpl get() = noImpl
var cssText: String var cssText: String
@@ -792,7 +792,7 @@ native public interface CSSRule {
} }
} }
native public interface CSSStyleRule : CSSRule { @native public interface CSSStyleRule : CSSRule {
var selectorText: String var selectorText: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -800,7 +800,7 @@ native public interface CSSStyleRule : CSSRule {
get() = noImpl get() = noImpl
} }
native public interface CSSImportRule : CSSRule { @native public interface CSSImportRule : CSSRule {
val href: String val href: String
get() = noImpl get() = noImpl
val media: MediaList val media: MediaList
@@ -809,19 +809,19 @@ native public interface CSSImportRule : CSSRule {
get() = noImpl get() = noImpl
} }
native public interface CSSGroupingRule : CSSRule { @native public interface CSSGroupingRule : CSSRule {
val cssRules: CSSRuleList val cssRules: CSSRuleList
get() = noImpl get() = 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 {
val media: MediaList val media: MediaList
get() = noImpl get() = 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
@@ -829,14 +829,14 @@ native public interface CSSPageRule : CSSGroupingRule {
get() = noImpl get() = noImpl
} }
native public interface CSSMarginRule : CSSRule { @native public interface CSSMarginRule : CSSRule {
val name: String val name: String
get() = noImpl get() = noImpl
val style: CSSStyleDeclaration val style: CSSStyleDeclaration
get() = noImpl get() = noImpl
} }
native public interface CSSNamespaceRule : CSSRule { @native public interface CSSNamespaceRule : CSSRule {
var namespaceURI: String var namespaceURI: String
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -845,7 +845,7 @@ native public interface CSSNamespaceRule : CSSRule {
set(value) = noImpl set(value) = noImpl
} }
native public interface PseudoElement : GeometryNode { @native public interface PseudoElement : GeometryNode {
val cascadedStyle: CSSStyleDeclaration val cascadedStyle: CSSStyleDeclaration
get() = noImpl get() = noImpl
val defaultStyle: CSSStyleDeclaration val defaultStyle: CSSStyleDeclaration
@@ -860,7 +860,7 @@ native public interface PseudoElement : GeometryNode {
fun convertPointFromNode(point: DOMPointInit, from: GeometryNode, options: ConvertCoordinateOptions = noImpl): DOMPoint = noImpl fun convertPointFromNode(point: DOMPointInit, from: GeometryNode, options: ConvertCoordinateOptions = noImpl): DOMPoint = noImpl
} }
native public interface CSS { @native public interface CSS {
companion object { companion object {
fun escape(ident: String): String = noImpl fun escape(ident: String): String = noImpl
@@ -20,7 +20,7 @@ import org.w3c.performance.*
import org.w3c.workers.* import org.w3c.workers.*
import org.w3c.xhr.* import org.w3c.xhr.*
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) {
open val view: Window? open val view: Window?
get() = noImpl get() = noImpl
open val detail: Int open val detail: Int
@@ -28,12 +28,12 @@ native public open class UIEvent(type: String, eventInitDict: UIEventInit = noIm
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
} }
native public interface UIEventInit : EventInit { @native public interface UIEventInit : EventInit {
var view: Window? var view: Window?
var detail: Int var detail: Int
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun UIEventInit(view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): UIEventInit { public inline fun UIEventInit(view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): UIEventInit {
val o = js("({})") val o = js("({})")
@@ -45,17 +45,17 @@ public inline fun UIEventInit(view: Window? = null, detail: Int = 0, bubbles: Bo
return o return o
} }
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) {
open val relatedTarget: EventTarget? open val relatedTarget: EventTarget?
get() = noImpl get() = 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
} }
native public interface FocusEventInit : UIEventInit { @native public interface FocusEventInit : UIEventInit {
var relatedTarget: EventTarget? var relatedTarget: EventTarget?
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun FocusEventInit(relatedTarget: EventTarget? = null, view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): FocusEventInit { public inline fun FocusEventInit(relatedTarget: EventTarget? = null, view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): FocusEventInit {
val o = js("({})") val o = js("({})")
@@ -68,7 +68,7 @@ public inline fun FocusEventInit(relatedTarget: EventTarget? = null, view: Windo
return o return o
} }
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 {
open val region: String? open val region: String?
get() = noImpl get() = noImpl
// open val screenX: Double // open val screenX: Double
@@ -117,7 +117,7 @@ native public open class MouseEvent(typeArg: String, mouseEventInitDict: MouseEv
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 interface MouseEventInit : EventModifierInit { @native public interface MouseEventInit : EventModifierInit {
var screenX: Int var screenX: Int
var screenY: Int var screenY: Int
var clientX: Int var clientX: Int
@@ -127,7 +127,7 @@ native public interface MouseEventInit : EventModifierInit {
var relatedTarget: EventTarget? var relatedTarget: EventTarget?
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun MouseEventInit(screenX: Int = 0, screenY: Int = 0, clientX: Int = 0, clientY: Int = 0, button: Short = 0, buttons: Short = 0, relatedTarget: EventTarget? = null, ctrlKey: Boolean = false, shiftKey: Boolean = false, altKey: Boolean = false, metaKey: Boolean = false, modifierAltGraph: Boolean = false, modifierCapsLock: Boolean = false, modifierFn: Boolean = false, modifierFnLock: Boolean = false, modifierHyper: Boolean = false, modifierNumLock: Boolean = false, modifierOS: Boolean = false, modifierScrollLock: Boolean = false, modifierSuper: Boolean = false, modifierSymbol: Boolean = false, modifierSymbolLock: Boolean = false, view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): MouseEventInit { public inline fun MouseEventInit(screenX: Int = 0, screenY: Int = 0, clientX: Int = 0, clientY: Int = 0, button: Short = 0, buttons: Short = 0, relatedTarget: EventTarget? = null, ctrlKey: Boolean = false, shiftKey: Boolean = false, altKey: Boolean = false, metaKey: Boolean = false, modifierAltGraph: Boolean = false, modifierCapsLock: Boolean = false, modifierFn: Boolean = false, modifierFnLock: Boolean = false, modifierHyper: Boolean = false, modifierNumLock: Boolean = false, modifierOS: Boolean = false, modifierScrollLock: Boolean = false, modifierSuper: Boolean = false, modifierSymbol: Boolean = false, modifierSymbolLock: Boolean = false, view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): MouseEventInit {
val o = js("({})") val o = js("({})")
@@ -161,7 +161,7 @@ public inline fun MouseEventInit(screenX: Int = 0, screenY: Int = 0, clientX: In
return o return o
} }
native public interface EventModifierInit : UIEventInit { @native public interface EventModifierInit : UIEventInit {
var ctrlKey: Boolean var ctrlKey: Boolean
var shiftKey: Boolean var shiftKey: Boolean
var altKey: Boolean var altKey: Boolean
@@ -179,7 +179,7 @@ native public interface EventModifierInit : UIEventInit {
var modifierSymbolLock: Boolean var modifierSymbolLock: Boolean
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun EventModifierInit(ctrlKey: Boolean = false, shiftKey: Boolean = false, altKey: Boolean = false, metaKey: Boolean = false, modifierAltGraph: Boolean = false, modifierCapsLock: Boolean = false, modifierFn: Boolean = false, modifierFnLock: Boolean = false, modifierHyper: Boolean = false, modifierNumLock: Boolean = false, modifierOS: Boolean = false, modifierScrollLock: Boolean = false, modifierSuper: Boolean = false, modifierSymbol: Boolean = false, modifierSymbolLock: Boolean = false, view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): EventModifierInit { public inline fun EventModifierInit(ctrlKey: Boolean = false, shiftKey: Boolean = false, altKey: Boolean = false, metaKey: Boolean = false, modifierAltGraph: Boolean = false, modifierCapsLock: Boolean = false, modifierFn: Boolean = false, modifierFnLock: Boolean = false, modifierHyper: Boolean = false, modifierNumLock: Boolean = false, modifierOS: Boolean = false, modifierScrollLock: Boolean = false, modifierSuper: Boolean = false, modifierSymbol: Boolean = false, modifierSymbolLock: Boolean = false, view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): EventModifierInit {
val o = js("({})") val o = js("({})")
@@ -206,7 +206,7 @@ public inline fun EventModifierInit(ctrlKey: Boolean = false, shiftKey: Boolean
return o return o
} }
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) {
open val deltaX: Double open val deltaX: Double
get() = noImpl get() = noImpl
open val deltaY: Double open val deltaY: Double
@@ -224,14 +224,14 @@ native public open class WheelEvent(typeArg: String, wheelEventInitDict: WheelEv
} }
} }
native public interface WheelEventInit : MouseEventInit { @native public interface WheelEventInit : MouseEventInit {
var deltaX: Double var deltaX: Double
var deltaY: Double var deltaY: Double
var deltaZ: Double var deltaZ: Double
var deltaMode: Int var deltaMode: Int
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun WheelEventInit(deltaX: Double = 0.0, deltaY: Double = 0.0, deltaZ: Double = 0.0, deltaMode: Int = 0, screenX: Int = 0, screenY: Int = 0, clientX: Int = 0, clientY: Int = 0, button: Short = 0, buttons: Short = 0, relatedTarget: EventTarget? = null, ctrlKey: Boolean = false, shiftKey: Boolean = false, altKey: Boolean = false, metaKey: Boolean = false, modifierAltGraph: Boolean = false, modifierCapsLock: Boolean = false, modifierFn: Boolean = false, modifierFnLock: Boolean = false, modifierHyper: Boolean = false, modifierNumLock: Boolean = false, modifierOS: Boolean = false, modifierScrollLock: Boolean = false, modifierSuper: Boolean = false, modifierSymbol: Boolean = false, modifierSymbolLock: Boolean = false, view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): WheelEventInit { public inline fun WheelEventInit(deltaX: Double = 0.0, deltaY: Double = 0.0, deltaZ: Double = 0.0, deltaMode: Int = 0, screenX: Int = 0, screenY: Int = 0, clientX: Int = 0, clientY: Int = 0, button: Short = 0, buttons: Short = 0, relatedTarget: EventTarget? = null, ctrlKey: Boolean = false, shiftKey: Boolean = false, altKey: Boolean = false, metaKey: Boolean = false, modifierAltGraph: Boolean = false, modifierCapsLock: Boolean = false, modifierFn: Boolean = false, modifierFnLock: Boolean = false, modifierHyper: Boolean = false, modifierNumLock: Boolean = false, modifierOS: Boolean = false, modifierScrollLock: Boolean = false, modifierSuper: Boolean = false, modifierSymbol: Boolean = false, modifierSymbolLock: Boolean = false, view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): WheelEventInit {
val o = js("({})") val o = js("({})")
@@ -269,7 +269,7 @@ public inline fun WheelEventInit(deltaX: Double = 0.0, deltaY: Double = 0.0, del
return o return o
} }
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) {
open val key: String open val key: String
get() = noImpl get() = noImpl
open val code: String open val code: String
@@ -305,7 +305,7 @@ native public open class KeyboardEvent(typeArg: String, keyboardEventInitDict: K
} }
} }
native public interface KeyboardEventInit : EventModifierInit { @native public interface KeyboardEventInit : EventModifierInit {
var key: String var key: String
var code: String var code: String
var location: Int var location: Int
@@ -313,7 +313,7 @@ native public interface KeyboardEventInit : EventModifierInit {
var isComposing: Boolean var isComposing: Boolean
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun KeyboardEventInit(key: String = "", code: String = "", location: Int = 0, repeat: Boolean = false, isComposing: Boolean = false, ctrlKey: Boolean = false, shiftKey: Boolean = false, altKey: Boolean = false, metaKey: Boolean = false, modifierAltGraph: Boolean = false, modifierCapsLock: Boolean = false, modifierFn: Boolean = false, modifierFnLock: Boolean = false, modifierHyper: Boolean = false, modifierNumLock: Boolean = false, modifierOS: Boolean = false, modifierScrollLock: Boolean = false, modifierSuper: Boolean = false, modifierSymbol: Boolean = false, modifierSymbolLock: Boolean = false, view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): KeyboardEventInit { public inline fun KeyboardEventInit(key: String = "", code: String = "", location: Int = 0, repeat: Boolean = false, isComposing: Boolean = false, ctrlKey: Boolean = false, shiftKey: Boolean = false, altKey: Boolean = false, metaKey: Boolean = false, modifierAltGraph: Boolean = false, modifierCapsLock: Boolean = false, modifierFn: Boolean = false, modifierFnLock: Boolean = false, modifierHyper: Boolean = false, modifierNumLock: Boolean = false, modifierOS: Boolean = false, modifierScrollLock: Boolean = false, modifierSuper: Boolean = false, modifierSymbol: Boolean = false, modifierSymbolLock: Boolean = false, view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): KeyboardEventInit {
val o = js("({})") val o = js("({})")
@@ -345,17 +345,17 @@ public inline fun KeyboardEventInit(key: String = "", code: String = "", locatio
return o return o
} }
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) {
open val data: String open val data: String
get() = noImpl get() = 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
} }
native public interface CompositionEventInit : UIEventInit { @native public interface CompositionEventInit : UIEventInit {
var data: String var data: String
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun CompositionEventInit(data: String = "", view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): CompositionEventInit { public inline fun CompositionEventInit(data: String = "", view: Window? = null, detail: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): CompositionEventInit {
val o = js("({})") val o = js("({})")
@@ -368,7 +368,7 @@ public inline fun CompositionEventInit(data: String = "", view: Window? = null,
return o return o
} }
native public open class MutationEvent : Event(noImpl, noImpl) { @native public open class MutationEvent : Event(noImpl, noImpl) {
open val relatedNode: Node? open val relatedNode: Node?
get() = noImpl get() = noImpl
open val prevValue: String open val prevValue: String
@@ -388,7 +388,7 @@ native public open class MutationEvent : Event(noImpl, noImpl) {
} }
} }
native public open class Event(type: String, eventInitDict: EventInit = noImpl) { @native public open class Event(type: String, eventInitDict: EventInit = noImpl) {
open val type: String open val type: String
get() = noImpl get() = noImpl
open val target: EventTarget? open val target: EventTarget?
@@ -420,7 +420,7 @@ native public open class Event(type: String, eventInitDict: EventInit = noImpl)
} }
} }
native public interface EventTarget { @native public interface EventTarget {
fun addEventListener(type: String, callback: EventListener?, capture: Boolean = false): Unit = noImpl fun addEventListener(type: String, callback: EventListener?, capture: Boolean = false): Unit = noImpl
fun addEventListener(type: String, callback: ((Event) -> Unit)?, capture: Boolean = false): Unit = noImpl fun addEventListener(type: String, callback: ((Event) -> Unit)?, capture: Boolean = false): Unit = noImpl
fun removeEventListener(type: String, callback: EventListener?, capture: Boolean = false): Unit = noImpl fun removeEventListener(type: String, callback: EventListener?, capture: Boolean = false): Unit = noImpl
@@ -428,7 +428,7 @@ native public interface EventTarget {
fun dispatchEvent(event: Event): Boolean = noImpl fun dispatchEvent(event: Event): Boolean = noImpl
} }
native public interface EventListener { @native public interface EventListener {
fun handleEvent(event: Event): Unit = noImpl fun handleEvent(event: Event): Unit = noImpl
} }
File diff suppressed because it is too large Load Diff
@@ -20,11 +20,11 @@ import org.w3c.performance.*
import org.w3c.workers.* import org.w3c.workers.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public open class DOMParser { @native public open class DOMParser {
fun parseFromString(str: String, type: dynamic): Document = noImpl fun parseFromString(str: String, type: dynamic): Document = noImpl
} }
native public open class XMLSerializer { @native public open class XMLSerializer {
fun serializeToString(root: Node): String = noImpl fun serializeToString(root: Node): String = noImpl
} }
File diff suppressed because it is too large Load Diff
@@ -20,7 +20,7 @@ import org.w3c.performance.*
import org.w3c.workers.* import org.w3c.workers.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public open class URL(url: String, base: String = noImpl) { @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
@@ -66,7 +66,7 @@ native public open class URL(url: String, base: String = noImpl) {
} }
} }
native public open class URLSearchParams(init: dynamic = "") { @native public open class URLSearchParams(init: dynamic = "") {
fun append(name: String, value: String): Unit = noImpl fun append(name: String, value: String): Unit = noImpl
fun delete(name: String): Unit = noImpl fun delete(name: String): Unit = noImpl
fun get(name: String): String? = noImpl fun get(name: String): String? = noImpl
@@ -20,7 +20,7 @@ import org.w3c.performance.*
import org.w3c.workers.* import org.w3c.workers.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public open class Headers(init: dynamic = noImpl) { @native public open class Headers(init: dynamic = noImpl) {
fun append(name: String, value: String): Unit = noImpl fun append(name: String, value: String): Unit = noImpl
fun delete(name: String): Unit = noImpl fun delete(name: String): Unit = noImpl
fun get(name: String): String? = noImpl fun get(name: String): String? = noImpl
@@ -29,7 +29,7 @@ native public open class Headers(init: dynamic = noImpl) {
fun set(name: String, value: String): Unit = noImpl fun set(name: String, value: String): Unit = noImpl
} }
native public open class Request(input: dynamic, init: RequestInit = noImpl) { @native public open class Request(input: dynamic, init: RequestInit = noImpl) {
open val method: String open val method: String
get() = noImpl get() = noImpl
open val url: String open val url: String
@@ -58,7 +58,7 @@ native public open class Request(input: dynamic, init: RequestInit = noImpl) {
fun text(): dynamic = noImpl fun text(): dynamic = noImpl
} }
native public interface RequestInit { @native public interface RequestInit {
var method: String var method: String
var headers: dynamic var headers: dynamic
var body: dynamic var body: dynamic
@@ -68,7 +68,7 @@ native public interface RequestInit {
var redirect: String var redirect: String
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun RequestInit(method: String, headers: dynamic, body: dynamic, mode: String, credentials: String, cache: String, redirect: String): RequestInit { public inline fun RequestInit(method: String, headers: dynamic, body: dynamic, mode: String, credentials: String, cache: String, redirect: String): RequestInit {
val o = js("({})") val o = js("({})")
@@ -83,7 +83,7 @@ public inline fun RequestInit(method: String, headers: dynamic, body: dynamic, m
return o return o
} }
native public open class Response(body: dynamic = noImpl, init: ResponseInit = noImpl) { @native public open class Response(body: dynamic = noImpl, init: ResponseInit = noImpl) {
open val type: String open val type: String
get() = noImpl get() = noImpl
open val url: String open val url: String
@@ -111,13 +111,13 @@ native public open class Response(body: dynamic = noImpl, init: ResponseInit = n
} }
} }
native public interface ResponseInit { @native public interface ResponseInit {
var status: Short var status: Short
var statusText: String var statusText: String
var headers: dynamic var headers: dynamic
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun ResponseInit(status: Short = 200, statusText: String = "OK", headers: dynamic): ResponseInit { public inline fun ResponseInit(status: Short = 200, statusText: String = "OK", headers: dynamic): ResponseInit {
val o = js("({})") val o = js("({})")
+10 -10
View File
@@ -20,7 +20,7 @@ import org.w3c.performance.*
import org.w3c.workers.* import org.w3c.workers.*
import org.w3c.xhr.* 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()
open val size: Int open val size: Int
get() = noImpl get() = noImpl
@@ -32,11 +32,11 @@ native public open class Blob() : ImageBitmapSource {
fun close(): Unit = noImpl fun close(): Unit = noImpl
} }
native public interface BlobPropertyBag { @native public interface BlobPropertyBag {
var type: String var type: String
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun BlobPropertyBag(type: String = ""): BlobPropertyBag { public inline fun BlobPropertyBag(type: String = ""): BlobPropertyBag {
val o = js("({})") val o = js("({})")
@@ -45,19 +45,19 @@ public inline fun BlobPropertyBag(type: String = ""): BlobPropertyBag {
return o return o
} }
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() {
open val name: String open val name: String
get() = noImpl get() = noImpl
open val lastModified: Int open val lastModified: Int
get() = noImpl get() = noImpl
} }
native public interface FilePropertyBag { @native public interface FilePropertyBag {
var type: String var type: String
var lastModified: Int var lastModified: Int
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun FilePropertyBag(type: String = "", lastModified: Int): FilePropertyBag { public inline fun FilePropertyBag(type: String = "", lastModified: Int): FilePropertyBag {
val o = js("({})") val o = js("({})")
@@ -67,14 +67,14 @@ public inline fun FilePropertyBag(type: String = "", lastModified: Int): FilePro
return o return o
} }
native public interface FileList { @native public interface FileList {
val length: Int val length: Int
get() = noImpl get() = 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 {
open val readyState: Short open val readyState: Short
get() = noImpl get() = noImpl
open val result: dynamic open val result: dynamic
@@ -111,7 +111,7 @@ native public open class FileReader : EventTarget {
} }
} }
native public open class FileReaderSync { @native public open class FileReaderSync {
fun readAsArrayBuffer(blob: Blob): ArrayBuffer = noImpl fun readAsArrayBuffer(blob: Blob): ArrayBuffer = noImpl
fun readAsText(blob: Blob, label: String = noImpl): String = noImpl fun readAsText(blob: Blob, label: String = noImpl): String = noImpl
fun readAsDataURL(blob: Blob): String = noImpl fun readAsDataURL(blob: Blob): String = noImpl
@@ -20,7 +20,7 @@ import org.w3c.performance.*
import org.w3c.workers.* import org.w3c.workers.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public open class Notification(title: String, options: NotificationOptions = noImpl) : EventTarget { @native public open class Notification(title: String, options: NotificationOptions = noImpl) : EventTarget {
var onclick: ((Event) -> dynamic)? var onclick: ((Event) -> dynamic)?
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -61,7 +61,7 @@ native public open class Notification(title: String, options: NotificationOption
} }
} }
native public interface NotificationOptions { @native public interface NotificationOptions {
var dir: String var dir: String
var lang: String var lang: String
var body: String var body: String
@@ -76,7 +76,7 @@ native public interface NotificationOptions {
var data: Any? var data: Any?
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun NotificationOptions(dir: String = "auto", lang: String = "", body: String = "", tag: String = "", icon: String, sound: String, vibrate: dynamic, renotify: Boolean = false, silent: Boolean = false, noscreen: Boolean = false, sticky: Boolean = false, data: Any? = null): NotificationOptions { public inline fun NotificationOptions(dir: String = "auto", lang: String = "", body: String = "", tag: String = "", icon: String, sound: String, vibrate: dynamic, renotify: Boolean = false, silent: Boolean = false, noscreen: Boolean = false, sticky: Boolean = false, data: Any? = null): NotificationOptions {
val o = js("({})") val o = js("({})")
@@ -96,11 +96,11 @@ public inline fun NotificationOptions(dir: String = "auto", lang: String = "", b
return o return o
} }
native public interface GetNotificationOptions { @native public interface GetNotificationOptions {
var tag: String var tag: String
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun GetNotificationOptions(tag: String = ""): GetNotificationOptions { public inline fun GetNotificationOptions(tag: String = ""): GetNotificationOptions {
val o = js("({})") val o = js("({})")
@@ -109,16 +109,16 @@ public inline fun GetNotificationOptions(tag: String = ""): GetNotificationOptio
return o return o
} }
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) {
open val notification: Notification open val notification: Notification
get() = noImpl get() = noImpl
} }
native public interface NotificationEventInit : ExtendableEventInit { @native public interface NotificationEventInit : ExtendableEventInit {
var notification: Notification var notification: Notification
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun NotificationEventInit(notification: Notification, bubbles: Boolean = false, cancelable: Boolean = false): NotificationEventInit { public inline fun NotificationEventInit(notification: Notification, bubbles: Boolean = false, cancelable: Boolean = false): NotificationEventInit {
val o = js("({})") val o = js("({})")
@@ -20,7 +20,7 @@ import org.w3c.notifications.*
import org.w3c.workers.* import org.w3c.workers.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public interface Performance { @native public interface Performance {
val timing: PerformanceTiming val timing: PerformanceTiming
get() = noImpl get() = noImpl
val navigation: PerformanceNavigation val navigation: PerformanceNavigation
@@ -28,7 +28,7 @@ native public interface Performance {
fun now(): Double = noImpl fun now(): Double = noImpl
} }
native public interface PerformanceTiming { @native public interface PerformanceTiming {
val navigationStart: Int val navigationStart: Int
get() = noImpl get() = noImpl
val unloadEventStart: Int val unloadEventStart: Int
@@ -73,7 +73,7 @@ native public interface PerformanceTiming {
get() = noImpl get() = noImpl
} }
native public interface PerformanceNavigation { @native public interface PerformanceNavigation {
val type: Short val type: Short
get() = noImpl get() = noImpl
val redirectCount: Short val redirectCount: Short
@@ -20,7 +20,7 @@ import org.w3c.notifications.*
import org.w3c.performance.* import org.w3c.performance.*
import org.w3c.xhr.* import org.w3c.xhr.*
native public interface ServiceWorkerRegistration : EventTarget { @native public interface ServiceWorkerRegistration : EventTarget {
val installing: ServiceWorker? val installing: ServiceWorker?
get() = noImpl get() = noImpl
val waiting: ServiceWorker? val waiting: ServiceWorker?
@@ -41,7 +41,7 @@ native public interface ServiceWorkerRegistration : EventTarget {
fun getNotifications(filter: GetNotificationOptions = noImpl): dynamic = noImpl fun getNotifications(filter: GetNotificationOptions = noImpl): dynamic = noImpl
} }
native public interface ServiceWorkerGlobalScope : WorkerGlobalScope { @native public interface ServiceWorkerGlobalScope : WorkerGlobalScope {
val clients: Clients val clients: Clients
get() = noImpl get() = noImpl
val registration: ServiceWorkerRegistration val registration: ServiceWorkerRegistration
@@ -67,7 +67,7 @@ native public interface ServiceWorkerGlobalScope : WorkerGlobalScope {
fun skipWaiting(): dynamic = noImpl fun skipWaiting(): dynamic = noImpl
} }
native public interface ServiceWorker : EventTarget, UnionMessagePortOrServiceWorker, UnionClientOrMessagePortOrServiceWorker { @native public interface ServiceWorker : EventTarget, UnionMessagePortOrServiceWorker, UnionClientOrMessagePortOrServiceWorker {
val scriptURL: String val scriptURL: String
get() = noImpl get() = noImpl
val state: String val state: String
@@ -83,7 +83,7 @@ native public interface ServiceWorker : EventTarget, UnionMessagePortOrServiceWo
fun postMessage(message: Any?, transfer: Array<Transferable> = noImpl): Unit = noImpl fun postMessage(message: Any?, transfer: Array<Transferable> = noImpl): Unit = noImpl
} }
native public interface ServiceWorkerContainer : EventTarget { @native public interface ServiceWorkerContainer : EventTarget {
val controller: ServiceWorker? val controller: ServiceWorker?
get() = noImpl get() = noImpl
val ready: dynamic val ready: dynamic
@@ -102,11 +102,11 @@ native public interface ServiceWorkerContainer : EventTarget {
fun getRegistrations(): dynamic = noImpl fun getRegistrations(): dynamic = noImpl
} }
native public interface RegistrationOptions { @native public interface RegistrationOptions {
var scope: String var scope: String
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun RegistrationOptions(scope: String): RegistrationOptions { public inline fun RegistrationOptions(scope: String): RegistrationOptions {
val o = js("({})") val o = js("({})")
@@ -115,7 +115,7 @@ public inline fun RegistrationOptions(scope: String): RegistrationOptions {
return o return o
} }
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) {
open val data: Any? open val data: Any?
get() = noImpl get() = noImpl
open val origin: String open val origin: String
@@ -129,7 +129,7 @@ native public open class ServiceWorkerMessageEvent(type: String, eventInitDict:
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
} }
native public interface ServiceWorkerMessageEventInit : EventInit { @native public interface ServiceWorkerMessageEventInit : EventInit {
var data: Any? var data: Any?
var origin: String var origin: String
var lastEventId: String var lastEventId: String
@@ -137,7 +137,7 @@ native public interface ServiceWorkerMessageEventInit : EventInit {
var ports: Array<MessagePort> var ports: Array<MessagePort>
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun ServiceWorkerMessageEventInit(data: Any?, origin: String, lastEventId: String, source: UnionMessagePortOrServiceWorker?, ports: Array<MessagePort>, bubbles: Boolean = false, cancelable: Boolean = false): ServiceWorkerMessageEventInit { public inline fun ServiceWorkerMessageEventInit(data: Any?, origin: String, lastEventId: String, source: UnionMessagePortOrServiceWorker?, ports: Array<MessagePort>, bubbles: Boolean = false, cancelable: Boolean = false): ServiceWorkerMessageEventInit {
val o = js("({})") val o = js("({})")
@@ -152,7 +152,7 @@ public inline fun ServiceWorkerMessageEventInit(data: Any?, origin: String, last
return o return o
} }
native public interface Client : UnionClientOrMessagePortOrServiceWorker { @native public interface Client : UnionClientOrMessagePortOrServiceWorker {
val url: String val url: String
get() = noImpl get() = noImpl
val frameType: String val frameType: String
@@ -162,7 +162,7 @@ native public interface Client : UnionClientOrMessagePortOrServiceWorker {
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 {
val visibilityState: dynamic val visibilityState: dynamic
get() = noImpl get() = noImpl
val focused: Boolean val focused: Boolean
@@ -170,18 +170,18 @@ native public interface WindowClient : Client {
fun focus(): dynamic = noImpl fun focus(): dynamic = noImpl
} }
native public interface Clients { @native public interface Clients {
fun matchAll(options: ClientQueryOptions = noImpl): dynamic = noImpl fun matchAll(options: ClientQueryOptions = noImpl): dynamic = noImpl
fun openWindow(url: String): dynamic = noImpl fun openWindow(url: String): dynamic = noImpl
fun claim(): dynamic = noImpl fun claim(): dynamic = noImpl
} }
native public interface ClientQueryOptions { @native public interface ClientQueryOptions {
var includeUncontrolled: Boolean var includeUncontrolled: Boolean
var type: String var type: String
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun ClientQueryOptions(includeUncontrolled: Boolean = false, type: String = "window"): ClientQueryOptions { public inline fun ClientQueryOptions(includeUncontrolled: Boolean = false, type: String = "window"): ClientQueryOptions {
val o = js("({})") val o = js("({})")
@@ -191,14 +191,14 @@ public inline fun ClientQueryOptions(includeUncontrolled: Boolean = false, type:
return o return o
} }
native public open class ExtendableEvent(type: String, eventInitDict: ExtendableEventInit = noImpl) : Event(type, eventInitDict) { @native public open class ExtendableEvent(type: String, eventInitDict: ExtendableEventInit = noImpl) : Event(type, eventInitDict) {
fun waitUntil(f: dynamic): Unit = noImpl fun waitUntil(f: dynamic): Unit = noImpl
} }
native public interface ExtendableEventInit : EventInit { @native public interface ExtendableEventInit : EventInit {
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun ExtendableEventInit(bubbles: Boolean = false, cancelable: Boolean = false): ExtendableEventInit { public inline fun ExtendableEventInit(bubbles: Boolean = false, cancelable: Boolean = false): ExtendableEventInit {
val o = js("({})") val o = js("({})")
@@ -208,7 +208,7 @@ public inline fun ExtendableEventInit(bubbles: Boolean = false, cancelable: Bool
return o return o
} }
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) {
open val request: Request open val request: Request
get() = noImpl get() = noImpl
open val client: Client open val client: Client
@@ -218,13 +218,13 @@ native public open class FetchEvent(type: String, eventInitDict: FetchEventInit
fun respondWith(r: dynamic): Unit = noImpl fun respondWith(r: dynamic): Unit = noImpl
} }
native public interface FetchEventInit : ExtendableEventInit { @native public interface FetchEventInit : ExtendableEventInit {
var request: Request var request: Request
var client: Client var client: Client
var isReload: Boolean var isReload: Boolean
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun FetchEventInit(request: Request, client: Client, isReload: Boolean = false, bubbles: Boolean = false, cancelable: Boolean = false): FetchEventInit { public inline fun FetchEventInit(request: Request, client: Client, isReload: Boolean = false, bubbles: Boolean = false, cancelable: Boolean = false): FetchEventInit {
val o = js("({})") val o = js("({})")
@@ -237,7 +237,7 @@ public inline fun FetchEventInit(request: Request, client: Client, isReload: Boo
return o return o
} }
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) {
open val data: Any? open val data: Any?
get() = noImpl get() = noImpl
open val origin: String open val origin: String
@@ -251,7 +251,7 @@ native public open class ExtendableMessageEvent(type: String, eventInitDict: Ext
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
} }
native public interface ExtendableMessageEventInit : ExtendableEventInit { @native public interface ExtendableMessageEventInit : ExtendableEventInit {
var data: Any? var data: Any?
var origin: String var origin: String
var lastEventId: String var lastEventId: String
@@ -259,7 +259,7 @@ native public interface ExtendableMessageEventInit : ExtendableEventInit {
var ports: Array<MessagePort> var ports: Array<MessagePort>
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun ExtendableMessageEventInit(data: Any?, origin: String, lastEventId: String, source: UnionClientOrMessagePortOrServiceWorker?, ports: Array<MessagePort>, bubbles: Boolean = false, cancelable: Boolean = false): ExtendableMessageEventInit { public inline fun ExtendableMessageEventInit(data: Any?, origin: String, lastEventId: String, source: UnionClientOrMessagePortOrServiceWorker?, ports: Array<MessagePort>, bubbles: Boolean = false, cancelable: Boolean = false): ExtendableMessageEventInit {
val o = js("({})") val o = js("({})")
@@ -274,7 +274,7 @@ public inline fun ExtendableMessageEventInit(data: Any?, origin: String, lastEve
return o return o
} }
native public interface Cache { @native public interface Cache {
fun match(request: dynamic, options: CacheQueryOptions = noImpl): dynamic = noImpl fun match(request: dynamic, options: CacheQueryOptions = noImpl): dynamic = noImpl
fun matchAll(request: dynamic = noImpl, options: CacheQueryOptions = noImpl): dynamic = noImpl fun matchAll(request: dynamic = noImpl, options: CacheQueryOptions = noImpl): dynamic = noImpl
fun add(request: dynamic): dynamic = noImpl fun add(request: dynamic): dynamic = noImpl
@@ -284,14 +284,14 @@ native public interface Cache {
fun keys(request: dynamic = noImpl, options: CacheQueryOptions = noImpl): dynamic = noImpl fun keys(request: dynamic = noImpl, options: CacheQueryOptions = noImpl): dynamic = noImpl
} }
native public interface CacheQueryOptions { @native public interface CacheQueryOptions {
var ignoreSearch: Boolean var ignoreSearch: Boolean
var ignoreMethod: Boolean var ignoreMethod: Boolean
var ignoreVary: Boolean var ignoreVary: Boolean
var cacheName: String var cacheName: String
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun CacheQueryOptions(ignoreSearch: Boolean = false, ignoreMethod: Boolean = false, ignoreVary: Boolean = false, cacheName: String): CacheQueryOptions { public inline fun CacheQueryOptions(ignoreSearch: Boolean = false, ignoreMethod: Boolean = false, ignoreVary: Boolean = false, cacheName: String): CacheQueryOptions {
val o = js("({})") val o = js("({})")
@@ -303,14 +303,14 @@ public inline fun CacheQueryOptions(ignoreSearch: Boolean = false, ignoreMethod:
return o return o
} }
native public interface CacheBatchOperation { @native public interface CacheBatchOperation {
var type: String var type: String
var request: Request var request: Request
var response: Response var response: Response
var options: CacheQueryOptions var options: CacheQueryOptions
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun CacheBatchOperation(type: String, request: Request, response: Response, options: CacheQueryOptions): CacheBatchOperation { public inline fun CacheBatchOperation(type: String, request: Request, response: Response, options: CacheQueryOptions): CacheBatchOperation {
val o = js("({})") val o = js("({})")
@@ -322,7 +322,7 @@ public inline fun CacheBatchOperation(type: String, request: Request, response:
return o return o
} }
native public interface CacheStorage { @native public interface CacheStorage {
fun match(request: dynamic, options: CacheQueryOptions = noImpl): dynamic = noImpl fun match(request: dynamic, options: CacheQueryOptions = noImpl): dynamic = noImpl
fun has(cacheName: String): dynamic = noImpl fun has(cacheName: String): dynamic = noImpl
fun open(cacheName: String): dynamic = noImpl fun open(cacheName: String): dynamic = noImpl
@@ -330,9 +330,9 @@ native public interface CacheStorage {
fun keys(): dynamic = noImpl fun keys(): dynamic = noImpl
} }
native public open class FunctionalEvent : ExtendableEvent(noImpl, noImpl) { @native public open class FunctionalEvent : ExtendableEvent(noImpl, noImpl) {
} }
native public marker interface UnionClientOrMessagePortOrServiceWorker { @native public @marker interface UnionClientOrMessagePortOrServiceWorker {
} }
+7 -7
View File
@@ -20,7 +20,7 @@ import org.w3c.notifications.*
import org.w3c.performance.* import org.w3c.performance.*
import org.w3c.workers.* import org.w3c.workers.*
native public interface XMLHttpRequestEventTarget : EventTarget { @native public interface XMLHttpRequestEventTarget : EventTarget {
var onloadstart: ((Event) -> dynamic)? var onloadstart: ((Event) -> dynamic)?
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -44,10 +44,10 @@ native public interface XMLHttpRequestEventTarget : EventTarget {
set(value) = noImpl set(value) = noImpl
} }
native public interface XMLHttpRequestUpload : XMLHttpRequestEventTarget { @native public interface XMLHttpRequestUpload : XMLHttpRequestEventTarget {
} }
native public open class XMLHttpRequest : XMLHttpRequestEventTarget { @native public open class XMLHttpRequest : XMLHttpRequestEventTarget {
var onreadystatechange: ((Event) -> dynamic)? var onreadystatechange: ((Event) -> dynamic)?
get() = noImpl get() = noImpl
set(value) = noImpl set(value) = noImpl
@@ -94,7 +94,7 @@ native public open class XMLHttpRequest : XMLHttpRequestEventTarget {
} }
} }
native public open class FormData(form: HTMLFormElement = noImpl) { @native public open class FormData(form: HTMLFormElement = noImpl) {
fun append(name: String, value: dynamic): Unit = noImpl fun append(name: String, value: dynamic): Unit = noImpl
fun delete(name: String): Unit = noImpl fun delete(name: String): Unit = noImpl
fun get(name: String): dynamic = noImpl fun get(name: String): dynamic = noImpl
@@ -103,7 +103,7 @@ native public open class FormData(form: HTMLFormElement = noImpl) {
fun set(name: String, value: dynamic): Unit = noImpl fun set(name: String, value: dynamic): Unit = 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) {
open val lengthComputable: Boolean open val lengthComputable: Boolean
get() = noImpl get() = noImpl
open val loaded: Int open val loaded: Int
@@ -112,13 +112,13 @@ native public open class ProgressEvent(type: String, eventInitDict: ProgressEven
get() = noImpl get() = noImpl
} }
native public interface ProgressEventInit : EventInit { @native public interface ProgressEventInit : EventInit {
var lengthComputable: Boolean var lengthComputable: Boolean
var loaded: Int var loaded: Int
var total: Int var total: Int
} }
suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
public inline fun ProgressEventInit(lengthComputable: Boolean = false, loaded: Int = 0, total: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): ProgressEventInit { public inline fun ProgressEventInit(lengthComputable: Boolean = false, loaded: Int = 0, total: Int = 0, bubbles: Boolean = false, cancelable: Boolean = false): ProgressEventInit {
val o = js("({})") val o = js("({})")
+11 -11
View File
@@ -3,8 +3,8 @@ package kotlin.js.dom.html5
import kotlin.js.dom.html.HTMLElement import kotlin.js.dom.html.HTMLElement
import org.w3c.dom.Element import org.w3c.dom.Element
deprecated("Use declarations from org.w3c.dom instead") @Deprecated("Use declarations from org.w3c.dom instead")
public native trait HTMLCanvasElement : HTMLElement { public @native trait HTMLCanvasElement : HTMLElement {
public var width: Double public var width: Double
public var height: Double public var height: Double
public fun getContext(contextId: String, vararg attributes: Any): CanvasContext? public fun getContext(contextId: String, vararg attributes: Any): CanvasContext?
@@ -13,8 +13,8 @@ public native trait HTMLCanvasElement : HTMLElement {
public fun toDataURL(string: String): String public fun toDataURL(string: String): String
} }
deprecated("Use declarations from org.w3c.dom instead. See CanvasRenderingContext2D") @Deprecated("Use declarations from org.w3c.dom instead. See CanvasRenderingContext2D")
public native trait CanvasContext { public @native trait CanvasContext {
public var canvas: HTMLCanvasElement public var canvas: HTMLCanvasElement
public fun save(): Unit public fun save(): Unit
public fun restore(): Unit public fun restore(): Unit
@@ -78,24 +78,24 @@ public native trait CanvasContext {
public fun putImageData(image_data: ImageData, dx: Number, dy: Number, dirtyX: Number, dirtyY: Number, dirtyWidth: Number): Unit public fun putImageData(image_data: ImageData, dx: Number, dy: Number, dirtyX: Number, dirtyY: Number, dirtyWidth: Number): Unit
} }
deprecated("Use declarations from org.w3c.dom instead") @Deprecated("Use declarations from org.w3c.dom instead")
public native trait CanvasGradient { public @native trait CanvasGradient {
public fun addColorStop(offset: Number, color: String): Unit public fun addColorStop(offset: Number, color: String): Unit
} }
deprecated("Use declarations from org.w3c.dom instead") @Deprecated("Use declarations from org.w3c.dom instead")
public native trait ImageData { public @native trait ImageData {
public var data: CanvasPixelArray public var data: CanvasPixelArray
public var width: Double public var width: Double
public var height: Double public var height: Double
} }
public native trait CanvasPixelArray { public @native trait CanvasPixelArray {
public var length: Double public var length: Double
} }
deprecated("Use declarations from org.w3c.dom instead") @Deprecated("Use declarations from org.w3c.dom instead")
public native trait TextMetrics { public @native trait TextMetrics {
public var width: Double public var width: Double
} }
+12 -12
View File
@@ -1,35 +1,35 @@
package html5.files package html5.files
native @native
deprecated("Use org.w3c.dom") @Deprecated("Use org.w3c.dom")
public class FileReader() { public class FileReader() {
public var onloadend : ((FileReaderEvent)->Unit)? = noImpl // public var onloadend : ((FileReaderEvent)->Unit)? = noImpl //
public fun readAsDataURL(blob : Blob): Unit = noImpl public fun readAsDataURL(blob : Blob): Unit = noImpl
public val result : File = noImpl public val result : File = noImpl
} }
native @native
deprecated("Use org.w3c.dom") @Deprecated("Use org.w3c.dom")
public class FileReaderEvent() { public class FileReaderEvent() {
public val target : FileReader = noImpl public val target : FileReader = noImpl
} }
native @native
deprecated("Use org.w3c.dom") @Deprecated("Use org.w3c.dom")
public class FileList() { public class FileList() {
public fun item(index : Int) : File? = noImpl public fun item(index : Int) : File? = noImpl
public val length : Int = noImpl public val length : Int = noImpl
} }
native @native
deprecated("Use org.w3c.dom") @Deprecated("Use org.w3c.dom")
public class File() : Blob() { public class File() : Blob() {
public val name : String = noImpl public val name : String = noImpl
// readonly attribute Date lastModifiedDate; // readonly attribute Date lastModifiedDate;
} }
native @native
deprecated("Use org.w3c.dom") @Deprecated("Use org.w3c.dom")
public open class Blob(blobParts: Array<Any>? = undefined, options: BlobPropertyBag? = undefined) { public open class Blob(blobParts: Array<Any>? = undefined, options: BlobPropertyBag? = undefined) {
public val size: Int = noImpl public val size: Int = noImpl
public val type: String = noImpl public val type: String = noImpl
@@ -39,8 +39,8 @@ public open class Blob(blobParts: Array<Any>? = undefined, options: BlobProperty
// //
} }
native @native
deprecated("Use org.w3c.dom") @Deprecated("Use org.w3c.dom")
public trait BlobPropertyBag { public trait BlobPropertyBag {
public val type: String public val type: String
} }
+9 -9
View File
@@ -2,7 +2,7 @@ package jquery
import org.w3c.dom.Element import org.w3c.dom.Element
native @native
public class JQuery() { public class JQuery() {
public fun addClass(className: String): JQuery = noImpl; public fun addClass(className: String): JQuery = noImpl;
public fun addClass(f: Element.(Int, String) -> String): JQuery = noImpl; public fun addClass(f: Element.(Int, String) -> String): JQuery = noImpl;
@@ -43,7 +43,7 @@ public class JQuery() {
public fun `val`(): String? = noImpl public fun `val`(): String? = noImpl
} }
native @native
open public class MouseEvent() { open public class MouseEvent() {
public val pageX: Double = 0.0; public val pageX: Double = 0.0;
public val pageY: Double = 0.0; public val pageY: Double = 0.0;
@@ -52,20 +52,20 @@ open public class MouseEvent() {
public fun isDefaultPrevented(): Boolean = true; public fun isDefaultPrevented(): Boolean = true;
} }
native @native
public class MouseClickEvent() : MouseEvent() { public class MouseClickEvent() : MouseEvent() {
public val which: Int = 0; public val which: Int = 0;
} }
native("$") @native("$")
public fun jq(selector: String): JQuery = JQuery(); public fun jq(selector: String): JQuery = JQuery();
native("$") @native("$")
public fun jq(selector: String, context: Element): JQuery = JQuery(); public fun jq(selector: String, context: Element): JQuery = JQuery();
native("$") @native("$")
public fun jq(callback: () -> Unit): JQuery = JQuery(); public fun jq(callback: () -> Unit): JQuery = JQuery();
native("$") @native("$")
public fun jq(obj: JQuery): JQuery = JQuery(); public fun jq(obj: JQuery): JQuery = JQuery();
native("$") @native("$")
public fun jq(el: Element): JQuery = JQuery(); public fun jq(el: Element): JQuery = JQuery();
native("$") @native("$")
public fun jq(): JQuery = JQuery(); public fun jq(): JQuery = JQuery();
+10 -10
View File
@@ -4,23 +4,23 @@ package jquery.ui
//jquery UI //jquery UI
import jquery.JQuery import jquery.JQuery
native @native
public fun JQuery.buttonset() : JQuery = noImpl; public fun JQuery.buttonset() : JQuery = noImpl;
native @native
public fun JQuery.dialog() : JQuery = noImpl; public fun JQuery.dialog() : JQuery = noImpl;
native @native
public fun JQuery.dialog(params : Json) : JQuery = noImpl public fun JQuery.dialog(params : Json) : JQuery = noImpl
native @native
public fun JQuery.dialog(mode : String, param : String) : Any? = noImpl public fun JQuery.dialog(mode : String, param : String) : Any? = noImpl
native @native
public fun JQuery.dialog(mode : String) : JQuery = noImpl public fun JQuery.dialog(mode : String) : JQuery = noImpl
native @native
public fun JQuery.dialog(mode : String, param : String, value : Any?) : JQuery = noImpl public fun JQuery.dialog(mode : String, param : String, value : Any?) : JQuery = noImpl
native @native
public fun JQuery.button() : JQuery = noImpl; public fun JQuery.button() : JQuery = noImpl;
native @native
public fun JQuery.accordion() : JQuery = noImpl public fun JQuery.accordion() : JQuery = noImpl
native @native
public fun JQuery.draggable(params : Json) : JQuery = noImpl public fun JQuery.draggable(params : Json) : JQuery = noImpl
native @native
public fun JQuery.selectable() : JQuery = noImpl public fun JQuery.selectable() : JQuery = noImpl
+1 -1
View File
@@ -1,4 +1,4 @@
package org.junit package org.junit
native @native
public annotation class Test(val name: String = "") public annotation class Test(val name: String = "")
+1 -1
View File
@@ -4,6 +4,6 @@ package QUnit
* The [QUnit](http://qunitjs.com/) API * The [QUnit](http://qunitjs.com/) API
*/ */
native @native
public fun ok(actual: Boolean, message: String?): Unit = noImpl; public fun ok(actual: Boolean, message: String?): Unit = noImpl;
+4 -4
View File
@@ -2,15 +2,15 @@ package kotlin.browser
import org.w3c.dom.* import org.w3c.dom.*
native @native
public val window: Window = noImpl public val window: Window = noImpl
native @native
public val document: Document = noImpl public val document: Document = noImpl
native @native
public val localStorage: Storage = noImpl public val localStorage: Storage = noImpl
native @native
public val sessionStorage: Storage = noImpl public val sessionStorage: Storage = noImpl
+5 -5
View File
@@ -3,16 +3,16 @@ package kotlin.dom
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Node import org.w3c.dom.Node
deprecated("use declarations from org.w3c.dom instead: create document directly via constructor Document() or use document.implementation.createDocument") @Deprecated("use declarations from org.w3c.dom instead: create document directly via constructor Document() or use document.implementation.createDocument")
public fun createDocument(): Document = Document() public fun createDocument(): Document = Document()
deprecated("use member property outerHTML of Element class instead") @Deprecated("use member property outerHTML of Element class instead")
native public val Node.outerHTML: String get() = noImpl @native public val Node.outerHTML: String get() = noImpl
/** Converts the node to an XML String */ /** Converts the node to an XML String */
deprecated("use outerHTML directly") @Deprecated("use outerHTML directly")
public fun Node.toXmlString(): String = this.outerHTML public fun Node.toXmlString(): String = this.outerHTML
/** Converts the node to an XML String */ /** Converts the node to an XML String */
deprecated("use outerHTML directly") @Deprecated("use outerHTML directly")
public fun Node.toXmlString(xmlDeclaration: Boolean): String = this.outerHTML public fun Node.toXmlString(xmlDeclaration: Boolean): String = this.outerHTML
+1 -1
View File
@@ -5,7 +5,7 @@ import org.junit.Test as test
class JsonTest { class JsonTest {
test fun createJsonFromPairs() { @test fun createJsonFromPairs() {
var obj = json(Pair("firstName", "John"), Pair("lastName", "Doe"), Pair("age", 30)) var obj = json(Pair("firstName", "John"), Pair("lastName", "Doe"), Pair("age", 30))
assertEquals("John", obj["firstName"], "firstName") assertEquals("John", obj["firstName"], "firstName")
assertEquals("Doe", obj["lastName"], "lastName") assertEquals("Doe", obj["lastName"], "lastName")
+4 -4
View File
@@ -23,13 +23,13 @@ import org.junit.Test as test
class RegExpTest { class RegExpTest {
test fun regExpToString() { @test fun regExpToString() {
val pattern = "q(\\d+)d" val pattern = "q(\\d+)d"
val re = RegExp(pattern, "i") val re = RegExp(pattern, "i")
assertEquals("/$pattern/i", re.toString()) assertEquals("/$pattern/i", re.toString())
} }
test fun regExpProperties() { @test fun regExpProperties() {
val re1 = RegExp("[a-z]", "img") val re1 = RegExp("[a-z]", "img")
assertTrue(re1.global) assertTrue(re1.global)
assertTrue(re1.ignoreCase) assertTrue(re1.ignoreCase)
@@ -41,7 +41,7 @@ class RegExpTest {
} }
test fun regExpTest() { @test fun regExpTest() {
val pattern = "q(\\d+)d" val pattern = "q(\\d+)d"
val re = RegExp(pattern, "i") val re = RegExp(pattern, "i")
@@ -52,7 +52,7 @@ class RegExpTest {
} }
test fun regExpExec() { @test fun regExpExec() {
val string = "R2D2 beats A5D5 " val string = "R2D2 beats A5D5 "
var re = RegExp("""(\w\d)(\w\d)""", "g") var re = RegExp("""(\w\d)(\w\d)""", "g")
val m1 = re.exec(string)!! val m1 = re.exec(string)!!
@@ -71,8 +71,8 @@ private fun Appendable.renderFunctionDeclaration(f: GenerateFunction, override:
indent(commented, level) indent(commented, level)
when (f.nativeGetterOrSetter) { when (f.nativeGetterOrSetter) {
NativeGetterOrSetter.GETTER -> append("nativeGetter ") NativeGetterOrSetter.GETTER -> append("@nativeGetter ")
NativeGetterOrSetter.SETTER -> append("nativeSetter ") NativeGetterOrSetter.SETTER -> append("@nativeSetter ")
NativeGetterOrSetter.NONE -> {} NativeGetterOrSetter.NONE -> {}
} }
@@ -81,7 +81,7 @@ private fun Appendable.renderFunctionDeclaration(f: GenerateFunction, override:
} }
if (f.name in keywords) { if (f.name in keywords) {
append("native(\"${f.name}\") ") append("@native(\"${f.name}\") ")
} }
append("fun ${f.name.replaceKeywords()}") append("fun ${f.name.replaceKeywords()}")
renderArgumentsDeclaration(f.arguments, override) renderArgumentsDeclaration(f.arguments, override)
@@ -97,9 +97,9 @@ private fun GenerateAttribute.isRequiredFunctionArgument(owner: String, function
private fun GenerateFunction.fixRequiredArguments(parent: String) = copy(arguments = arguments.map { arg -> arg.copy(initializer = if (arg.isRequiredFunctionArgument(parent, name)) null else arg.initializer) }) private fun GenerateFunction.fixRequiredArguments(parent: String) = copy(arguments = arguments.map { arg -> arg.copy(initializer = if (arg.isRequiredFunctionArgument(parent, name)) null else arg.initializer) })
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) {
append("marker ") append("@marker ")
} }
when (iface.kind) { when (iface.kind) {
GenerateDefinitionKind.CLASS -> append("open class ") GenerateDefinitionKind.CLASS -> append("open class ")
@@ -192,7 +192,7 @@ fun Appendable.render(allTypes: Map<String, GenerateTraitOrClass>, typeNamesToUn
fun Appendable.renderBuilderFunction(dictionary: GenerateTraitOrClass, allSuperTypes: List<GenerateTraitOrClass>, allTypes: Set<String>) { fun Appendable.renderBuilderFunction(dictionary: GenerateTraitOrClass, allSuperTypes: List<GenerateTraitOrClass>, allTypes: Set<String>) {
val fields = (dictionary.memberAttributes + allSuperTypes.flatMap { it.memberAttributes }).distinctBy { it.signature }.map { it.copy(kind = AttributeKind.ARGUMENT) }.dynamicIfUnknownType(allTypes) val fields = (dictionary.memberAttributes + allSuperTypes.flatMap { it.memberAttributes }).distinctBy { it.signature }.map { it.copy(kind = AttributeKind.ARGUMENT) }.dynamicIfUnknownType(allTypes)
appendln("suppress(\"NOTHING_TO_INLINE\")") appendln("@Suppress(\"NOTHING_TO_INLINE\")")
append("public inline fun ${dictionary.name}") append("public inline fun ${dictionary.name}")
renderArgumentsDeclaration(fields) renderArgumentsDeclaration(fields)
appendln(": ${dictionary.name} {") appendln(": ${dictionary.name} {")
@@ -52,7 +52,7 @@ data class ArrayType(val memberType: Type, override val nullable: Boolean) : Typ
override fun render(): String = "Array<${memberType.render()}>".withSuffix() override fun render(): String = "Array<${memberType.render()}>".withSuffix()
} }
suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
private fun <T: Type> T.copyWithNullability(nullable: Boolean): T = when (this) { private fun <T: Type> T.copyWithNullability(nullable: Boolean): T = when (this) {
is UnitType -> UnitType is UnitType -> UnitType
is DynamicType -> this is DynamicType -> this