aboutsummaryrefslogtreecommitdiff
path: root/src/zilch/app/event.js
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-10-26 17:15:16 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2026-10-26 17:15:16 +0100
commitd38e1ffb1533565ecea6dd83cca88d36690fadef (patch)
tree4946ffec374d8d0353a909b2ae314b81cbf07031 /src/zilch/app/event.js
parent8dd8f96b24710dc4f2d29065928244a40a432379 (diff)
zilch: implement async
Diffstat (limited to 'src/zilch/app/event.js')
-rw-r--r--src/zilch/app/event.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/zilch/app/event.js b/src/zilch/app/event.js
index c55637c..9183bb5 100644
--- a/src/zilch/app/event.js
+++ b/src/zilch/app/event.js
@@ -3,12 +3,14 @@ async function wasm_handle_event(target, name, event, pass_event) {
const component = target.getRootNode().host;
+ const handler = WebAssembly.promising(wasm.exports[name])
+
if (pass_event) {
const id = ObjectStore.generateFreeId();
ObjectStore.registerObject(id, event);
- wasm.exports[name](component[ZsPtr], id);
+ handler(component[ZsPtr], id);
ObjectStore.free(event);
} else {
- wasm.exports[name](component[ZsPtr]);
+ handler(component[ZsPtr]);
}
}