Function

JSObjectCallAsFunction(_:_:_:_:_:_:)

Calls an object as a function.

Declaration

func JSObjectCallAsFunction(_ ctx: JSContextRef!, _ object: JSObjectRef!, _ thisObject: JSObjectRef!, _ argumentCount: Int, _ arguments: UnsafePointer<JSValueRef?>!, _ exception: UnsafeMutablePointer<JSValueRef?>!) -> JSValueRef!

Parameters

ctx

The execution context to use.

object

The JSObject 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 JSValue 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.

Return Value

The JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software