diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 8ded42c7..0cbf7984 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -28,6 +28,7 @@ Prepare For TR: true urlPrefix: https://tc39.github.io/ecma262/; spec: ECMASCRIPT type: interface; for: ECMAScript text: ArrayBuffer; url: sec-arraybuffer-objects + text: JSFunction; url: sec-function-objects type: exception; for: ECMAScript text: Error; url: sec-error-objects text: NativeError; url: sec-nativeerror-constructors @@ -93,6 +94,7 @@ urlPrefix: https://tc39.github.io/ecma262/; spec: ECMASCRIPT text: IterableToList; url: sec-iterabletolist text: ToBigInt64; url: #sec-tobigint64 text: BigInt; url: #sec-ecmascript-language-types-bigint-type + text: BoundFunctionCreate, url: #sec-boundfunctioncreate type: abstract-op text: CreateMethodProperty; url: sec-createmethodproperty urlPrefix: https://webassembly.github.io/spec/core/; spec: WebAssembly; type: dfn @@ -1106,8 +1108,6 @@ The type() method steps are:

Exported Functions

-callback JSFunction = any (any... arguments);
-
 dictionary FunctionType {
   required sequence<ValueType> parameters;
   required sequence<ValueType> results;
@@ -1118,6 +1118,7 @@ interface Function : JSFunction {
   constructor(FunctionType descriptor, JSFunction callable);
 
   FunctionType type();
+  JSFunction bind(any thisArg, any ...args);
 };
 
@@ -1318,6 +1319,17 @@ The type() method steps are: +
+ +The bind(|thisArg|, ...|args|) method steps are: + +1. Let |Target| be the **this** value. +1. Let |F| be [$BoundFunctionCreate$](|Target|, |thisArg|, |args|). +1. Set |F|.\[[Prototype]] to {{JSFunction}}.prototype. +1. Return |F|. + +
+
To construct a new WebAssembly Function from a JavaScript [=callable=] object |callable| and {{FunctionType}} |signature|, perform the following steps: