OH_ArkUI_InitModuleForArkTSEnv

Function OH_ArkUI_InitModuleForArkTSEnv 

Source
pub unsafe extern "C" fn OH_ArkUI_InitModuleForArkTSEnv(
    env: napi_env,
) -> ArkUiResult
Available on crate features api-12 and api-20 only.
Expand description

Initialize the ArkTS method for the specified env environment. Cannot be called on the non-UI thread. Checking for non-UI thread calls will abort.

§Arguments

  • env - napi environment pointer.

§Returns

  • The error code. [ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. [ARKUI_ERROR_CODE_PARAM_INVALID] if env is null or failed to set the whitelist. [ARKUI_ERROR_CODE_CAPI_INIT_ERROR] if the CAPI init error.

Available since API-level: 20