JSObjectMakeTypedArray top-level property
JSObjectRef Function(JSContextRef ctx, int arrayType, int length, Pointer<JSValueRef> exception)
JSObjectMakeTypedArray
final
Creates a JavaScript Typed Array object with the given number of elements.
ctx
(JSContextRef) The execution context to use.
arrayType
(JSTypedArrayType) A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned.
length
(size_t) The number of elements to be in the new Typed Array.
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 JSObjectRef that is a Typed Array with all elements set to zero or NULL if there was an error.
Implementation
final JSObjectRef Function(
JSContextRef ctx,
int /*JSTypedArrayType*/ arrayType,
int length,
Pointer<JSValueRef> exception,
)
JSObjectMakeTypedArray =
kLookup<
NativeFunction<
JSObjectRef Function(JSContextRef, Uint32, Size, Pointer<JSValueRef>)
>
>('JSObjectMakeTypedArray').asFunction();