napi_get_global

Function napi_get_global 

Source
pub unsafe extern "C" fn napi_get_global(
    env: napi_env,
    result: *mut napi_value,
) -> napi_status
Available on crate feature napi only.
Expand description

Obtains the ArkTS global object.

§Arguments

  • env - Current running virtual machine context.

  • result - The ArkTS global Object.

§Returns

  • Returns the function execution status. [napi_ok] If the function executed successfully.

[napi_invalid_arg] If the param env and(or) result is nullptr.

Available since API-level: 10