added a working JS test case using the standard kotlin browser API for interacting with the DOM
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user