Function

JSObjectCallAsConstructor(_:_:_:_:_:)

Calls an object as a constructor.

Declaration

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

Parameters

ctx

The execution context to use.

object

The JSObject to call as a constructor.

argumentCount

An integer count of the number of arguments in arguments.

arguments

A JSValue array of arguments to pass to the constructor. 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 JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor.