Chris Sinco [G]
08/16/2023, 6:56 AMload.mjs
file and then imports a <appname>.uninstantiated.mjs
file. I don't see that file generated in my web app static folder, so wondering where does that even come from?jamshedalamqaderi
08/16/2023, 7:03 AMjamshedalamqaderi
08/16/2023, 7:04 AMMichael Paus
08/16/2023, 7:29 AMimport androidx.compose.material.MaterialTheme
import de.mpmediasoft.polyspiral.gui.PolySpiralApp
import org.jetbrains.skiko.wasm.onWasmReady
fun main() {
onWasmReady {
BrowserViewportWindow("PolySpiral - Compose - JS") {
MaterialTheme {
PolySpiralApp()
}
}
}
}
The key seems to be the method onWasmReady
.mac
08/16/2023, 11:25 AMmac
08/16/2023, 11:28 AMmac
08/16/2023, 11:29 AMChris Sinco [G]
08/17/2023, 8:28 PMThe janky way to do this is to load a spinner inside a div and then hide that div from within wasmOh I totally forgot you could access the DOM in the main method since it’s Kotlin JS. I think I’ll do that instead of rely on the examples I’ve seen in
imageviewer