pub unsafe extern "C" fn napi_escape_handle(
env: napi_env,
scope: napi_escapable_handle_scope,
escapee: napi_value,
result: *mut napi_value,
) -> napi_statusAvailable on crate feature
napi only.Expand description
Promotes the handle to the input ArkTS object so that it is valid for the lifespan of its outer scope.
§Arguments
-
env- Current running virtual machine context. -
scope- Current scope. -
escapee- The ArkTS object to be escaped. -
result- The handle to the escaped object in the outer scope.
§Returns
- Returns the function execution status.
[
napi_ok] If the function executed successfully.
[napi_invalid_arg] If env, scope, escapee or result is nullptr.
Available since API-level: 10