Contents

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 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 to store an exception in, if any. Pass NULL to discard any exception.

Return Value

The JSValueRef that results from calling object as a function, or NULL if the system throws an exception or object isn’t a function.

See Also

Working with Objects