Skip to content

Commit 910997a

Browse files
committed
reserve wasm-js: on imports, hide wasm:, wasm-js: on exports
1 parent 60fa630 commit 910997a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

document/js-api/index.bs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,8 @@ To <dfn export>parse a WebAssembly module</dfn> given a <a>byte sequence</a> |by
14041404
1. [=Construct a WebAssembly module object=] from |module| and |bytes|, and let |module| be the result.
14051405
1. Let |requestedModules| be a set.
14061406
1. For each (|moduleName|, |name|, |type|) in [=module_imports=](|module|.\[[Module]]),
1407+
1. If |moduleName| starts with the prefix "wasm-js:",
1408+
1. Throw a {{LinkError}} exception.
14071409
1. Note: The following step only applies when integrating with the JS String Builtins proposal.
14081410
1. If [=Find a builtin=] with (|moduleName|, |name|, |type|) and builtins |module|.\[[BuiltinSets]] is not null, then [=iteration/continue=].
14091411
1. [=set/Append=] |moduleName| to |requestedModules|.
@@ -1442,7 +1444,8 @@ The <dfn>export name list</dfn> of a WebAssembly Module Record |record| is defin
14421444
1. Let |module| be |record|'s \[[ModuleSource]] internal slot.
14431445
1. Let |exports| be an empty [=list=].
14441446
1. For each (|name|, <var ignore>type</var>) in [=module_exports=](|module|.\[[Module]])
1445-
1. [=list/Append=] |name| to the end of |exports|.
1447+
1. If |name| does not start with the prefix "wasm:" or "wasm-js:",
1448+
1. [=list/Append=] |name| to the end of |exports|.
14461449
1. Return |exports|.
14471450

14481451
</div>

0 commit comments

Comments
 (0)