Merge remote-tracking branch 'origin/master'
Conflicts: js/js.tests/test/org/jetbrains/k2js/test/SingleFileTranslationTest.java js/js.tests/test/org/jetbrains/k2js/test/semantics/StdLibTestToJSTest.java
This commit is contained in:
@@ -93,7 +93,7 @@ native public trait DOMError {
|
||||
public val relatedException: Any
|
||||
public val severity: Short
|
||||
|
||||
class object {
|
||||
public class object {
|
||||
public val SEVERITY_WARNING: Short = 1
|
||||
public val SEVERITY_ERROR: Short = 2
|
||||
public val SEVERITY_FATAL_ERROR: Short = 3
|
||||
@@ -136,9 +136,9 @@ native public trait Element: Node {
|
||||
public val tagName: String
|
||||
public fun getAttribute(arg1: String?): String = js.noImpl
|
||||
public fun setAttribute(arg1: String?, arg2: String?): Unit = js.noImpl
|
||||
public fun removeAttribute(arg1: String?): Unit = js.noImpl
|
||||
public fun getElementsByTagName(arg1: String?): NodeList = js.noImpl
|
||||
public fun getElementsByTagNameNS(arg1: String?, arg2: String?): NodeList = js.noImpl
|
||||
public fun removeAttribute(arg1: String?): Unit = js.noImpl
|
||||
public fun getAttributeNode(arg1: String?): Attr = js.noImpl
|
||||
public fun removeAttributeNode(arg1: Attr): Attr = js.noImpl
|
||||
public fun getAttributeNS(arg1: String?, arg2: String?): String = js.noImpl
|
||||
@@ -270,7 +270,7 @@ native public trait TypeInfo {
|
||||
public val typeNamespace: String
|
||||
public fun isDerivedFrom(arg1: String?, arg2: String?, arg3: Int): Boolean = js.noImpl
|
||||
|
||||
class object {
|
||||
public class object {
|
||||
public val DERIVATION_RESTRICTION: Int = 1
|
||||
public val DERIVATION_EXTENSION: Int = 2
|
||||
public val DERIVATION_UNION: Int = 4
|
||||
@@ -281,7 +281,7 @@ native public trait TypeInfo {
|
||||
native public trait UserDataHandler {
|
||||
public fun handle(arg1: Short, arg2: String?, arg3: Any, arg4: Node, arg5: Node): Unit = js.noImpl
|
||||
|
||||
class object {
|
||||
public class object {
|
||||
public val NODE_CLONED: Short = 1
|
||||
public val NODE_IMPORTED: Short = 2
|
||||
public val NODE_DELETED: Short = 3
|
||||
|
||||
@@ -11,6 +11,7 @@ native public val Node.outerHTML: String
|
||||
get() = js.noImpl
|
||||
|
||||
/** Converts the node to an XML String */
|
||||
public fun Node.toXmlString(xmlDeclaration: Boolean = false): String {
|
||||
return this.outerHTML
|
||||
}
|
||||
public fun Node.toXmlString(): String = this.outerHTML
|
||||
|
||||
/** Converts the node to an XML String */
|
||||
public fun Node.toXmlString(xmlDeclaration: Boolean): String = this.outerHTML
|
||||
|
||||
@@ -2,6 +2,26 @@ package kotlin
|
||||
|
||||
import java.util.*
|
||||
|
||||
public inline fun <T> java.lang.Iterable<T>.toString(): String {
|
||||
return makeString(", ", "[", "]")
|
||||
}
|
||||
|
||||
public inline fun <T> java.util.List<T>.equals(that: List<T>): Boolean {
|
||||
val s1 = this.size()
|
||||
val s2 = that.size()
|
||||
if (s1 == s2) {
|
||||
for (i in 0.upto(s1)) {
|
||||
val elem1 = this.get(i)
|
||||
val elem2 = that.get(i)
|
||||
if (elem1 != elem2) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/** Returns a new ArrayList with a variable number of initial elements */
|
||||
public inline fun arrayList<T>(vararg values: T) : ArrayList<T> {
|
||||
val list = ArrayList<T>()
|
||||
@@ -11,6 +31,14 @@ public inline fun arrayList<T>(vararg values: T) : ArrayList<T> {
|
||||
return list
|
||||
}
|
||||
|
||||
/** Returns a new HashSet with a variable number of initial elements */
|
||||
public inline fun hashSet<T>(vararg values: T) : HashSet<T> {
|
||||
val list = HashSet<T>()
|
||||
for (value in values) {
|
||||
list.add(value)
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new List containing the results of applying the given *transform* function to each [[Map.Entry]] in this [[Map]]
|
||||
|
||||
Reference in New Issue
Block a user