napi_get_dataview_info
napi_status napi_get_dataview_info(napi_env env,
napi_value dataview,
size_t* byte_length,
void** data,
napi_value* arraybuffer,
size_t* byte_offset) [in] env:调用该 API 时所处的环境。[in] dataview:表示要查询其属性的DataView的napi_value。[out] byte_length:DataView中的字节数。[out] data:底层DataView的数据缓冲区。如果 byte_length 为0,则此值可能为NULL或其他任意指针值。[out] arraybuffer:DataView底层的ArrayBuffer。[out] byte_offset:在数据缓冲区内开始投射DataView的字节偏移量。
如果 API 成功,则返回 napi_ok。
【Returns napi_ok if the API succeeded.】
如果不需要该属性,任何输出参数都可以为 NULL。
【Any of the out parameters may be NULL if that property is unneeded.】
此 API 返回 DataView 的各种属性。
【This API returns various properties of a DataView.】