napi_create_object
napi_status napi_create_object(napi_env env, napi_value* result) -
[in] env:调用 API 的环境。¥
[in] env: The environment that the API is invoked under. -
[out] result:代表 JavaScriptObject的napi_value。¥
[out] result: Anapi_valuerepresenting a JavaScriptObject.
如果 API 成功,则返回 napi_ok。
¥Returns napi_ok if the API succeeded.
此 API 分配默认的 JavaScript Object。它相当于在 JavaScript 中执行 new Object()。
¥This API allocates a default JavaScript Object.
It is the equivalent of doing new Object() in JavaScript.
JavaScript Object 类型在 ECMAScript 语言规范的 对象类型部分 中进行了描述。
¥The JavaScript Object type is described in Section object type of the
ECMAScript Language Specification.