upgrades
This commit is contained in:
@@ -22,7 +22,14 @@ async function initWasm(): Promise<void> {
|
||||
self.onmessage = async (event) => {
|
||||
const { type, script } = event.data;
|
||||
|
||||
if (type === "run") {
|
||||
if (type === "init") {
|
||||
try {
|
||||
await initWasm();
|
||||
self.postMessage({ type: "ready" });
|
||||
} catch (error) {
|
||||
self.postMessage({ type: "error", error: String(error) });
|
||||
}
|
||||
} else if (type === "run") {
|
||||
try {
|
||||
await initWasm();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user