We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


This article covers features introduced in SpiderMonkey 17

Bind the given callable to use the given object as this.


JS_BindCallable(JSContext *cx, JS::Handle<JSObject*> callable,
                JS::Handle<JSObject*> newThis);
Name Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext.
callable JS::Handle&lt;JSObject*&gt; Pointer to the function object to bind new this.
newThis JS::Handle&lt;JSObject*&gt; Pointer to the new this value for callable.


JS_BindCallable binds the given callable to use the given object as this.

If callable is not callable, will throw and return nullptr.

See Also

Document Tags and Contributors

 Contributors to this page: kscarfone, arai
 Last updated by: kscarfone,