The callback invoked when an object is called as a function.
- iOS 7.0+
- macOS 10.5+
- tvOS 9.0+
The execution context to use.
A JSObject that is the function being called.
A JSObject that is the 'this' variable in the function's scope.
An integer count of the number of arguments in arguments.
A JSValue array of the arguments passed to the function.
A pointer to a JSValueRef in which to return an exception, if any.
A JSValue that is the function's return value.
If you named your function CallAsFunction, you would declare it like this:
JSValueRef CallAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments, JSValueRef* exception);
If this callback is NULL, calling your object as a function will throw an exception.