Skip to main content

JS_NewTypedArray

Function JS_NewTypedArray 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn JS_NewTypedArray( ctx: *mut JsContext, argc: c_int, argv: *const JsValue, array_type: c_int, ) -> JsValue
Expand description

JS_NewTypedArray: a view, built the way new Uint8Array(...) would be.

The arguments are the script constructor’s, which is why this is one entry point rather than one per element type: argc/argv are passed straight to the constructor.

§Safety

argv must point at argc live JSValues.