use channels for comms (#9)

this  refactors the app setup and messaging modules
This commit is contained in:
Akash Shakdwipeea
2025-08-20 21:58:09 +05:30
committed by GitHub
parent ba2d1c064b
commit 3b81926ae1
22 changed files with 981 additions and 900 deletions
+7 -4
View File
@@ -1,10 +1,13 @@
import wbg_init, { main, App } from "../pkg/wasm-index.js";
import wbg_init, { main } from "../pkg/wasm-index.js";
const start = async () => {
await wbg_init();
main();
const app = new App();
};
start();
// Wait for DOM to be ready before starting
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', start);
} else {
start();
}