Skip to content

Commit b1da11a

Browse files
author
Guy Bedford
committed
reserve wasm: prefix in imports and note integration with string builtins
1 parent f1c3a98 commit b1da11a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

document/js-api/index.bs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,6 +1409,7 @@ To <dfn export>parse a WebAssembly module</dfn> given a <a>byte sequence</a> |by
14091409
\[[AsyncParentModules]]: &laquo; &raquo;,
14101410
\[[PendingAsyncDependencies]]: ~empty~,
14111411
}.
1412+
Node: When integrating with the JS String Builtins proposal, "<code data-x="">builtins: ["js-string"]</code>" should be provided by default in the above WebAssembly compilation options.
14121413

14131414
Note: From HTML, it's not observable when [=parse a WebAssembly module=] begins, so any work perfomed in compilation may be performed off-thread.
14141415
</div>
@@ -1462,6 +1463,8 @@ WebAssembly Module Records have the following methods:
14621463
1. Let |module| be |record|.\[[ModuleSource]].
14631464
1. Let |imports| be a new, empty [=map=].
14641465
1. For each (|importedModuleName|, |name|, <var ignore>type</var>) in [=module_imports=](|module|.\[[Module]]),
1466+
1. If |importedModuleName| starts with the string "wasm:",
1467+
1. Throw a {{LinkError}} exception.
14651468
1. If |imports|[|importedModuleName|] does not exist, set |imports|[|importedModuleName|] to a new, empty [=map=].
14661469
1. Let |importedModule| be [$GetImportedModule$](|record|, |importedModuleName|).
14671470
1. Let |value| be ? |importedModule|.\[[Environment]].GetBindingValue(|name|, true).

0 commit comments

Comments
 (0)