We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db58cd4 commit c3fee28Copy full SHA for c3fee28
doc/api/esm.md
@@ -722,6 +722,17 @@ const instance2 = await WebAssembly.instantiate(libraryModule, {
722
});
723
```
724
725
+In addition to the static source phase, there is also a dynamic variant of the
726
+source phase via the `import.source` dynamic phase import syntax:
727
+
728
+```js
729
+const dynamicLibrary = await import.source('./library.wasm');
730
731
+const instance = await WebAssembly.instantiate(dynamicLibrary, {
732
+ custom: import
733
+});
734
+```
735
736
<i id="esm_experimental_top_level_await"></i>
737
738
## Top-level `await`
0 commit comments