diff options
Diffstat (limited to 'src/zilch/app/event.js')
| -rw-r--r-- | src/zilch/app/event.js | 6 |
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]); } } |