Files
yawn/static/index.js
T
Akash Shakdwipeea 3b81926ae1 use channels for comms (#9)
this  refactors the app setup and messaging modules
2025-08-20 21:58:09 +05:30

14 lines
281 B
JavaScript

import wbg_init, { main } from "../pkg/wasm-index.js";
const start = async () => {
await wbg_init();
main();
};
// Wait for DOM to be ready before starting
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', start);
} else {
start();
}