diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-10-26 17:15:16 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-10-26 17:15:16 +0100 |
| commit | d38e1ffb1533565ecea6dd83cca88d36690fadef (patch) | |
| tree | 4946ffec374d8d0353a909b2ae314b81cbf07031 /src/zilch/component.template.js | |
| parent | 8dd8f96b24710dc4f2d29065928244a40a432379 (diff) | |
zilch: implement async
Diffstat (limited to 'src/zilch/component.template.js')
| -rw-r--r-- | src/zilch/component.template.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zilch/component.template.js b/src/zilch/component.template.js index bd6d634..553fe11 100644 --- a/src/zilch/component.template.js +++ b/src/zilch/component.template.js @@ -9,10 +9,10 @@ customElements.define("{s}-{s}", class extends HTMLElement {{ }} connectedCallback() {{ if (this[ZsPtr] === null) {{ - wasm_ready.then(() => {{ + wasm_ready.then(async () => {{ const id = ObjectStore.generateFreeId(); ObjectStore.registerObject(id, this); - this[ZsPtr] = wasm.exports['export::{s}::init'](id); + this[ZsPtr] = await WebAssembly.promising(wasm.exports['export::{s}::init'])(id); }}); }} }} |