diff --git a/libraries/stdlib/src/kotlin/dom/Dom.kt b/libraries/stdlib/src/kotlin/dom/Dom.kt index f9aa84b8287..923c47c00f3 100644 --- a/libraries/stdlib/src/kotlin/dom/Dom.kt +++ b/libraries/stdlib/src/kotlin/dom/Dom.kt @@ -11,8 +11,8 @@ import java.lang.IndexOutOfBoundsException // Properties -private val EmptyElementList: List = Collections.emptyList()!! -private val EmptyNodeList: List = Collections.emptyList()!! +private fun emptyElementList(): List = Collections.emptyList()!! +private fun emptyNodeList(): List = Collections.emptyList()!! var Node.text : String get() { @@ -123,7 +123,7 @@ inline fun Document?.elements(namespaceUri: String, localName: String): List { return if (this == null) { // TODO the following is easier to convert to JS - EmptyNodeList + emptyNodeList() } else { NodeListAsList(this) @@ -133,7 +133,7 @@ inline fun NodeList?.toList(): List { inline fun NodeList?.toElementList(): List { return if (this == null) { // TODO the following is easier to convert to JS - //EmptyElementList + //emptyElementList() ArrayList() } else { @@ -155,13 +155,13 @@ fun Document?.get(selector: String): List { return if (element != null) arrayList(element) else - EmptyElementList + emptyElementList() } else { // assume its a vanilla element name elements(selector) } } else { - EmptyElementList + emptyElementList() } } @@ -176,7 +176,7 @@ fun Element.get(selector: String): List { return if (element != null) arrayList(element) else - EmptyElementList + emptyElementList() } else { // assume its a vanilla element name elements(selector) diff --git a/libraries/tools/kotlin-js-tests/pom.xml b/libraries/tools/kotlin-js-tests/pom.xml index 0e360447400..03098c6bc96 100644 --- a/libraries/tools/kotlin-js-tests/pom.xml +++ b/libraries/tools/kotlin-js-tests/pom.xml @@ -43,13 +43,12 @@ -