added a working JS test case using the standard kotlin browser API for interacting with the DOM

This commit is contained in:
James Strachan
2012-05-25 20:38:04 +01:00
parent 3702bdea70
commit adf38a0648
7 changed files with 105 additions and 12 deletions
@@ -2,9 +2,10 @@ package test.browser
import kotlin.browser.document
fun foo() {
fun foo(): String {
val element = document.getElementById("foo")
if (element != null) {
element.appendChild(document.createTextNode("Some Dynamically Created Contenet!!!"))
element.appendChild(document.createTextNode("Some Dynamically Created Content!!!"))
}
return element.getTextContent()
}