Function JSObjectCallAsFunction

Source
pub unsafe extern "C" fn JSObjectCallAsFunction(
    ctx: JSContextRef,
    object: JSObjectRef,
    thisObject: JSObjectRef,
    argumentCount: usize,
    arguments: *const JSValueRef,
    exception: *mut JSValueRef,
) -> JSValueRef
Expand description

Calls an object as a function.

  • ctx: The execution context to use.
  • object: The JSObjectRef to call as a function.
  • thisObject: The object to use as this, or NULL to use the global object as this.
  • argumentCount: An integer count of the number of arguments in arguments.
  • arguments: A JSValueRef array of arguments to pass to the function. Pass NULL if argumentCount is 0.
  • exception: A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.

Returns the JSValueRef that results from calling object as a function, or NULL if an exception is thrown or object is not a function.

ยงSee also