JSObjectMakeTypedArrayWithArrayBufferAndOffset top-level property

JSObjectRef Function(JSContextRef ctx, int arrayType, JSObjectRef buffer, int byteOffset, int length, Pointer<JSValueRef> exception) JSObjectMakeTypedArrayWithArrayBufferAndOffset
final

MacOS 10.12, iOS 10.0 Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object with the given offset and length. ctx The execution context to use. arrayType A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned. buffer An Array Buffer object that should be used as the backing store for the created JavaScript Typed Array object. byteOffset The byte offset for the created Typed Array. byteOffset should aligned with the element size of arrayType. length The number of elements to include in the Typed Array. 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. @result A JSObjectRef that is a Typed Array or NULL if there was an error. The backing store of the Typed Array will be buffer.

Implementation

final JSObjectRef Function(JSContextRef ctx, int /*JSTypedArrayType*/ arrayType, JSObjectRef buffer, int byteOffset, int length, Pointer<JSValueRef> exception)
    JSObjectMakeTypedArrayWithArrayBufferAndOffset = jscLib
        .lookup<NativeFunction<JSObjectRef Function(JSContextRef ctx, Uint32 /*JSTypedArrayType*/ arrayType, JSObjectRef buffer, Size byteOffset, Size length, Pointer<JSValueRef> exception)>>(
            'JSObjectMakeTypedArrayWithArrayBufferAndOffset')
        .asFunction();