• Removes all children elements of the given element. Note that it uses e.removeChild() method in a loop, which is much faster than e.innerHTML=''. Also calls cleanElement for all descendant controls.

    Parameters

    • e: Element

      Element to clean

    • Optional onlyChildren: boolean

      Default false, cleans only children of e if set to 'true'.

    Returns Element

    The same element

    Method

    cleanElement