Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

230
Views
Kotlin WebAssembly access DOM

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?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!