napi_get_element
napi_status napi_get_element(napi_env env,
napi_value object,
uint32_t index,
napi_value* result);
-
[in] env
:调用 Node-API 调用的环境。¥
[in] env
: The environment that the Node-API call is invoked under. -
[in] object
:从中检索属性的对象。¥
[in] object
: The object from which to retrieve the property. -
[in] index
:要获取的属性的索引。¥
[in] index
: The index of the property to get. -
[out] result
:属性的值。¥
[out] result
: The value of the property.
如果 API 成功,则返回 napi_ok
。
¥Returns napi_ok
if the API succeeded.
此 API 获取请求索引处的元素。
¥This API gets the element at the requested index.