Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ urlPrefix: https://tc39.github.io/ecma262/; spec: ECMASCRIPT
text: Cyclic Module Record; url: cyclic-module-record
text: GetMethod; url: sec-getmethod
text: ToBigInt64; url: #sec-tobigint64
text: Module Namespace exotic object; url: #sec-module-namespace-exotic-objects
type: abstract-op
text: CreateDataPropertyOrThrow; url: sec-createdatapropertyorthrow
text: CreateMethodProperty; url: sec-createmethodproperty
Expand Down Expand Up @@ -631,6 +632,7 @@ Note: Some implementations enforce a size limitation on |bytes|. Use of this API
interface Instance {
constructor(Module module, optional object importObject);
readonly attribute object exports;
static Instance namespaceInstance(ModuleNamespace moduleNamespace);
};
</pre>

Expand All @@ -648,6 +650,14 @@ Note: The use of this synchronous API is discouraged, as some implementations so
The getter of the <dfn attribute for="Instance">exports</dfn> attribute of {{Instance}} returns **this**.\[[Exports]].
</div>

<div algorithm>
The <dfn method for="Instance">namespaceInstance(|namespace|)</dfn> method, when invoked, performs the following steps:
1. Assert: |namespace| is a [=Module Namespace exotic object=].
1. If |namespace|.\[[Module]] is not a [=WebAssembly Module Record=], [=throw=] a {{TypeError}} exception.
1. Let |module| be |namespace|.\[[Module]].
1. Return |module|.\[[Instance]].
</div>

<h3 id="memories">Memories</h3>

<pre class="idl">
Expand Down