napi_get_named_property
napi_status napi_get_named_property(napi_env env,
napi_value object,
const char* utf8Name,
napi_value* result); [in] env:调用 Node-API 时所处的环境。[in] 对象:要从中获取属性的对象。[in] utf8Name:要获取的属性名称。[out] result:该属性的值。
如果 API 成功,则返回 napi_ok。
【Returns napi_ok if the API succeeded.】
此方法等同于调用 napi_get_property,并使用从传入的 utf8Name 字符串创建的 napi_value。
【This method is equivalent to calling napi_get_property with a napi_value
created from the string passed in as utf8Name.】