napi_status napi_escape_handle(napi_env env,napi_escapable_handle_scope scope,napi_value escapee,napi_value* result);
[in] env: The environment that the API is invoked under.[in] scope:napi_valuerepresenting the current scope.[in] escapee:napi_valuerepresenting the JavaScriptObjectto be escaped.[out] result:napi_valuerepresenting the handle to the escapedObjectin the outer scope.
Returns napi_ok if the API succeeded.
This API promotes the handle to the JavaScript object so that it is valid for the lifetime of the outer scope. It can only be called once per scope. If it is called more than once an error will be returned.
This API can be called even if there is a pending JavaScript exception.
