- Notifications
You must be signed in to change notification settings - Fork1.2k
JsCreateTypedArray
Limin Zhu edited this pageOct 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. UseJS_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 isJS_INVALID_REFERENCE) or when baseArray is an ArrayBuffer object. Must be 0 otherwise.
- result: The new typed array object.
The codeJsNoError if the operation succeeded, a failure code otherwise.
ThebaseArray can be anArrayBuffer, another typed array, or a JavaScriptArray. The returned typed array will use the baseArray if it is an ArrayBuffer, orotherwise 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!