Value.newTypedArrayWithBuffer

Create a new typed array value with elements from an array buffer.

Create a #JSCValue referencing a new typed array value containing elements of the given type, where the elements are stored at the memory region represented by the array_buffer.

The type must *not* be JSC_TYPED_ARRAY_NONE.

The offset and length parameters can be used to indicate which part of the array buffer can be accessed through the typed array. If both are omitted (passing zero as offset, and -1 as length), the whole array_buffer is exposed through the typed array. Omitting the length with a non-zero offset will expose the remainder of the array_buffer starting at the indicated offset.

class Value
newTypedArrayWithBuffer

Parameters

type javascriptcore.types.TypedArrayType

type of array elements.

offset size_t

offset, in bytes.

length ptrdiff_t

number of array elements, or -1.

Return Value

Type: javascriptcore.value.Value

a #JSCValue