JSObjectMakeArray top-level property
JSObjectRef Function(JSContextRef ctx, int argumentCount, Pointer<JSValueRef> arguments, Pointer<JSValueRef> exception)
JSObjectMakeArray
final
Creates a JavaScript Array object.
The behavior of this function does not exactly match the behavior of the built-in Array constructor. Specifically, if one argument
is supplied, this function returns an array with one element.
ctx
(JSContextRef) The execution context to use.
argumentCount
(size_t) An integer count of the number of arguments in arguments.
arguments
(JSValueRef[]) A JSValue array of data to populate the Array with. Pass NULL if argumentCount is 0.
exception
(JSValueRef*) A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result
(JSObjectRef) A JSObject that is an Array.
Implementation
final JSObjectRef Function(
JSContextRef ctx,
int argumentCount,
Pointer<JSValueRef> arguments,
Pointer<JSValueRef> exception,
)
JSObjectMakeArray =
kLookup<
NativeFunction<
JSObjectRef Function(
JSContextRef,
Size,
Pointer<JSValueRef>,
Pointer<JSValueRef>,
)
>
>('JSObjectMakeArray').asFunction();