I've got the following code in Kotlin
import kotlinx.interop.wasm.dom.*
import kotlinx.wasm.jsinterop.*
fun main(args: Array<String>) {
val veryImportantCalculation = 42
//access the #wasm in html and append it to the element
}
which is compiled to wasmFunctions.wasm,
and an extremely easy HTML:
<html>
<head>
<meta charset='UTF-8'>
<script wasm="./wasmFunctions.wasm" src="./wasmFunctions.wasm.js"></script>
</head>
<body>
<label id='wasm'></label>
</body>
</html>
I need to put the veryImportantCalculation value from Kotlin-to-wasm code in the #wasm label. Is there a way to with the imported dom library?