Hi Guys ^^,
I need to call this kotlin function from wasm index.html script.
Copy code
@JsExport
fun submitJsonToKMM(jsonData: String) {
}
My index.html code
Copy 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…
b
bashor
10/08/2024, 10:27 PM
Depends on which output do you consume.
If it’s webpack output (dist) you need to configure Webapck in build.gradle.kts like: