napi_open_escapable_handle_scope


NAPI_EXTERN napi_status
    napi_open_escapable_handle_scope(napi_env env,
                                     napi_handle_scope* result); 
  • [in] env:调用该 API 时所处的环境。
  • [out] result:表示新作用域的 napi_value

如果 API 成功,则返回 napi_ok

【Returns napi_ok if the API succeeded.】

这个 API 打开一个新的作用域,从中可以将一个对象提升到外部作用域。

【This API opens a new scope from which one object can be promoted to the outer scope.】