Nitish Mishra
10/08/2024, 6:12 PM@JsExport
fun submitJsonToKMM(jsonData: String) {
}
My index.html code
<script>
const editor = ace.edit("editor");
function submitJson() {
const jsonData = editor.getValue();
// Pass the JSON data to the KMM WASM project
submitJsonToKMM(jsonData);
}
</script>
It’s not working, getting submitJsonToKMM is not defined
, Can anyone please help…bashor
10/08/2024, 10:27 PMbrowser {
commonWebpackConfig {
output = KotlinWebpackOutput("Foo", KotlinWebpackOutput.Target.VAR)
...
}
}
Related webpack docsbashor
10/08/2024, 10:27 PMbashor
10/08/2024, 10:30 PM<script type="module">
// to avoid writing await ..ю every time
globalThis.Foo = await Foo;
// call exported fun bar
Foo.bar();
</script>