File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -717,13 +717,9 @@ into a new instance of `library.wasm`:
717
717
` ` ` js
718
718
import source libraryModule from ' ./library.wasm' ;
719
719
720
- const instance1 = await WebAssembly .instantiate (libraryModule, {
721
- custom: import1,
722
- });
720
+ const instance1 = await WebAssembly .instantiate (libraryModule, importObject1);
723
721
724
- const instance2 = await WebAssembly .instantiate (libraryModule, {
725
- custom: import2,
726
- });
722
+ const instance2 = await WebAssembly .instantiate (libraryModule, importObject2);
727
723
` ` `
728
724
729
725
In addition to the static source phase, there is also a dynamic variant of the
@@ -732,9 +728,7 @@ source phase via the `import.source` dynamic phase import syntax:
732
728
` ` ` js
733
729
const dynamicLibrary = await import .source(' ./library.wasm' );
734
730
735
- const instance = await WebAssembly .instantiate (dynamicLibrary, {
736
- custom: importObj,
737
- });
731
+ const instance = await WebAssembly .instantiate (dynamicLibrary, importObject);
738
732
` ` `
739
733
740
734
<i id="esm_experimental_top_level_await"></i>
You can’t perform that action at this time.
0 commit comments