-
Notifications
You must be signed in to change notification settings - Fork 1.2k
JsCreateTypedArray
Limin Zhu edited this page Oct 9, 2015
·
1 revision
Creates a Javascript typed array object.
STDAPI_(JsErrorCode)
JsCreateTypedArray(
_In_ JsTypedArrayType arrayType,
_In_ JsValueRef baseArray,
_In_ unsigned int byteOffset,
_In_ unsigned int elementLength,
_Out_ JsValueRef *result);
- arrayType: The type of the array to create.
- baseArray: The base array of the new array. Use JS_INVALID_REFERENCE if no base array.
- byteOffset: The offset in bytes from the start of baseArray (ArrayBuffer) for result typed array to reference. Only applicable when baseArray is an ArrayBuffer object. Must be 0 otherwise.
- elementLength: The number of elements in the array. Only applicable when creating a new typed array without baseArray (baseArray is JS_INVALID_REFERENCE) or when baseArray is an ArrayBuffer object. Must be 0 otherwise.
- result: The new typed array object.
The code JsNoError if the operation succeeded, a failure code otherwise.
The baseArray can be an ArrayBuffer, another typed array, or a JavaScript Array. The returned typed array will use the baseArray if it is an ArrayBuffer, or otherwise create and use a copy of the underlying source array. Requires an active script context.
- Architecture Overview
- Building ChakraCore
- ChakraCore Code Structure
- Contributor Guidance
- Engineering Notes
- Embedding ChakraCore
- Testing ChakraCore
- Getting ChakraCore binaries
- Label Glossary
- Resources
- Roadmap / Release Notes
Want to contribute to this Wiki? Fork it and send a pull request!