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] resultnapi_value 代表 JavaScript global 对象。

    ¥[out] result: napi_value representing JavaScript global object.

如果 API 成功,则返回 napi_ok

¥Returns napi_ok if the API succeeded.

此 API 返回 global 对象。

¥This API returns the global object.