WebUI X Documentation
    Preparing search index...

    Represents the WebUI interface for interacting with native application functionalities. This class bridges JavaScript calls to methods exposed by the native ApplicationInterface.

    Index

    Constructors

    • Returns WebUI

    Accessors

    • get currentApplication(): null | WXApp

      Gets information about the current application. Corresponds to ApplicationInterface.currentApplication getter.

      Returns null | WXApp

      An object with packageName, versionName, and versionCode, or null if unavailable.

    • get currentRootManager(): null | WXApp

      Gets information about the current root manager application. Corresponds to ApplicationInterface.currentRootManager getter.

      Returns null | WXApp

      An object with packageName, versionName, and versionCode, or null if unavailable.

    Methods

    • Exits the native application. Corresponds to ApplicationInterface.exit().

      Returns void

    • Gets information about a specific application by its package name. Corresponds to ApplicationInterface.getApplication(packageName).

      Parameters

      • packageName: string

        The package name of the application.

      Returns null | WXApp

      An object with packageName, versionName, and versionCode, or null if unavailable/error.

    • Opens a file chooser dialog using the provided intent data. Corresponds to ApplicationInterface.openFile(i: IntentData?).

      Parameters

      • intent: Intent

        An Intent object (from the previously defined Intent class) containing file selection details.

      Returns void

    • Sets the refreshing state of the pull-to-refresh mechanism. Requires pull-to-refresh and JavaScript refresh interceptor to be enabled natively. Corresponds to ApplicationInterface.setRefreshing(state).

      Parameters

      • state: boolean

        True to show refreshing indicator, false to hide.

      Returns void

    • Starts a new activity using the provided intent data. Corresponds to ApplicationInterface.startActivity(i: IntentData).

      Parameters

      • intent: Intent

        An Intent object (from the previously defined Intent class) describing the activity to start.

      Returns void