Calling JS code from KT/Wasm

I want to write a library for developing web games using KT/WASM, but I can’t figure out how to call JS code (specifically, WebGPU and Canvas APIs) from Kotlin.