napi_get_global
napi_status napi_get_global(napi_env env, napi_value* result) -
[in] env:调用 API 的环境。¥
[in] env: The environment that the API is invoked under. -
[out] result:napi_value代表 JavaScriptglobal对象。¥
[out] result:napi_valuerepresenting JavaScriptglobalobject.
如果 API 成功,则返回 napi_ok。
¥Returns napi_ok if the API succeeded.
此 API 返回 global 对象。
¥This API returns the global object.