update the DOM API so that we implement using the property style access of properties which work natively in JS and avoid using getter/setter methods in the DOM library so that they can easily compile to JS too from the same org.w3c.dom API on the JVM
This commit is contained in:
@@ -60,7 +60,7 @@ class DomBuilderTest() : TestCase() {
|
||||
assertEquals(1, doc["#id2"].size())
|
||||
assertEquals(1, doc["#id3"].size())
|
||||
|
||||
val root = doc.rootElement
|
||||
val root = doc.documentElement
|
||||
if (root == null) {
|
||||
fail("No root!")
|
||||
} else {
|
||||
@@ -120,7 +120,7 @@ class DomBuilderTest() : TestCase() {
|
||||
} else {
|
||||
fail("Not an Element $grandChild")
|
||||
}
|
||||
val children = doc.rootElement.children()
|
||||
val children = doc.documentElement.children()
|
||||
val xml = nodesToXmlString(children)
|
||||
println("root element has children: ${xml}")
|
||||
assertEquals(1, children.size())
|
||||
|
||||
Reference in New Issue
Block a user