https://kotlinlang.org logo
#webassembly
Title
# webassembly
t

T8522192

03/06/2024, 4:08 AM
Anyone tries to call js("debugger;") ran into error
Uncaught (in promise) TypeError: type incompatibility when transforming from/to JS
before? wonder how to solve it
I check in uninstantiated.js
Copy code
...
wasmExports = wasmInstance.exports;
    if (runInitializer) {
j        wasmExports._initialize();
    }

    return { instance: wasmInstance,  exports: wasmExports };
might be strange char j being compiled into here cause the issue?
s

Svyatoslav Kuzmich [JB]

03/06/2024, 1:22 PM
This works for me
Copy code
fun debugger(): Unit = js("{ debugger; }")

fun main() {
    debugger()
}
🙌 1
t

T8522192

03/07/2024, 3:25 AM
ohh thanks! it works😊
2 Views