pub unsafe extern "C-unwind" fn JSObjectCallAsFunction(
ctx: JSContextRef,
object: JSObjectRef,
this_object: JSObjectRef,
argument_count: usize,
arguments: *mut JSValueRef,
exception: *mut JSValueRef,
) -> JSValueRef
Available on crate features
JSObjectRef
and JSBase
only.Expand description
Calls an object as a function.
Parameter ctx
: The execution context to use.
Parameter object
: The JSObject to call as a function.
Parameter thisObject
: The object to use as “this,” or NULL to use the global object as “this.”
Parameter argumentCount
: An integer count of the number of arguments in arguments.
Parameter arguments
: A JSValue array of arguments to pass to the function. Pass NULL if argumentCount is 0.
Parameter 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 JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function.