napi_open_handle_scope


NAPI_EXTERN napi_status napi_open_handle_scope(napi_env env,
                                               napi_handle_scope* result); 
  • [in] env:调用 API 的环境。

    ¥[in] env: The environment that the API is invoked under.

  • [out] resultnapi_value 代表新范围。

    ¥[out] result: napi_value representing the new scope.

如果 API 成功,则返回 napi_ok

¥Returns napi_ok if the API succeeded.

此 API 开辟了一个新的范围。

¥This API opens a new scope.