tachControls

[ Function ] [Deprecated]

export function tachControls(
    callback: null | (
         () => void
    ) = null
): void;

Initiates a check to ascertain whether a control has been added to or removed from the DOM and calls the __attach or __detach function of the corresponding control.

tachControls 1:

From version 1.10, this function is considered obsolete. The system automatically detects whether controls have been added to or removed from the DOM.

Parameter

Name

Type

Description

callback

null, () => void

The callback function is called when the system has completed the check for new controls in the DOM.

Return value

Type

Description

void

No return value.

tachControls 2:

Available from 1.8

Sample - JavaScript

// create control
var subControl = TcHmi.ControlFactory.create('tchmi-button', 'newbutton');
if(subControl !== undefined) {
    // append control to ourself
    myControl.getElement().append(subControl.getElement());
    // force check if controls has been added
    TcHmi.Controls.tachControls();
}