Skip to content

Commit f524254

Browse files
lucacasonatolittledan
authored andcommitted
Integrate with Module Source Imports proposal
This commit integrates the Wasm ESM integration with the TC39 Module Source Imports proposal. The Module Source Imports proposal allows performing a JS import that early returns from the module loader at an earlier stage than evaluation, specifically after "fetch/compile". ``` import source mod from "./test.wasm"; mod instanceof WebAssembly.Module; // true ``` This enables Wasm-ESM integration for tooling that can not adopt "full" ESM because of the need for manual instantiation.
1 parent a2a469d commit f524254

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

document/js-api/index.bs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,4 +1355,13 @@ WebAssembly Module Records have the following methods:
13551355

13561356
</div>
13571357

1358+
<div algorithm=GetModuleSource>
1359+
1360+
<h3 id="get-module-source">GetModuleSource ( ) Concrete Method</h3>
1361+
1. Let |record| be this WebAssembly Module Record.
1362+
1. Let |module| be |record|.\[[WebAssemblyModule]].
1363+
1. Return |module|.
1364+
1365+
</div>
1366+
13581367
Note: See corresponding modifications to HTML in <a href="https://github.com/whatwg/html/pull/4372">PR #4372</a>.

0 commit comments

Comments
 (0)