Files
kotlin-fork/js/js.translator/testFiles/stdlib/cases/browserDocumentAccess.kt
T
James Strachan 1bf6ebac57 fixed a test case
2012-06-01 08:28:39 +01:00

12 lines
281 B
Kotlin

package test.browser
import kotlin.browser.document
fun foo(): String {
val element = document.getElementById("foo")
if (element != null) {
element.appendChild(document.createTextNode("Some Dynamically Created Content!!!"))
}
return element.textContent
}