Skip to content

Commit 421fab1

Browse files
Ms2gerlittledan
authored andcommitted
[js-api] Pass a functype parameter to "create a host function".
Fixes #768.
1 parent 9ac3049 commit 421fab1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

document/js-api/index.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ A {{Module}} object represents a single WebAssembly module. Each {{Module}} obje
332332

333333
Note: The signature is checked by [=instantiate_module=] invoked below.
334334
1. Otherwise,
335-
1. [=Create a host function=] from |v| and let |funcaddr| be the result.
335+
1. [=Create a host function=] from |v| and |functype|, and let |funcaddr| be the result.
336336
1. Let |index| be the number of external functions in |imports|. This value |index| is known as the <dfn>index of the host function</dfn> |funcaddr|.
337337
1. Let |externfunc| be the [=external value=] [=external value|𝖿𝗎𝗇𝖼=] |funcaddr|.
338338
1. [=Append=] |externfunc| to |imports|.
@@ -901,7 +901,7 @@ Note: [=call an Exported Function|Calling an Exported Function=] executes in the
901901
Note: Exported Functions do not have a \[[Construct]] method and thus it is not possible to call one with the `new` operator.
902902

903903
<div algorithm>
904-
To <dfn>create a host function</dfn> from the JavaScript object |func|, perform the following steps:
904+
To <dfn>create a host function</dfn> from the JavaScript object |func| and type |functype|, perform the following steps:
905905

906906
1. Let |hostfunc| be a [=host function=] which performs the following steps when called:
907907
1. If the signature contains an [=𝗂𝟨𝟦=] (as argument or result), the host function throws a {{TypeError}} when called.

0 commit comments

Comments
 (0)