API

Class XmlLoader

Class used to load GUI via XML.

Index
  • Gets a loaded node / control by id.

    Parameters

    • id: string

      the Controls id set in the xml

    Returns any

    element of type Control

  • Initiates the xml layout loading

    Parameters

    • xmlFile: any

      defines the xml layout to load

    • rootNode: any

      defines the node / control to use as a parent for the loaded layout controls.

    • onSuccess: Nullable<() => void> = null

      defines the callback called on layout load successfully.

    • onError: Nullable<(error: string) => void> = null

      defines the callback called on layout load failure.

    Returns void

  • Initiates the xml layout loading asynchronously

    Parameters

    • xmlFile: any

      defines the xml layout to load

    • rootNode: any

      defines the node / control to use as a parent for the loaded layout controls.

    Returns Promise<any>

    Promise