eventHandlers

[ Funktion ]

public eventHandlers(): { 
    name: 'animationstart' | 'animationend' | 'animationiteration';
    callback: (event: TcHmi.Animation.AnimationEvent) => void;
}[];

Gibt alle registrierten Event Handler zurück.

Parameter

Name

Typ

Beschreibung

-

-

-

Rückgabewert

Typ

Beschreibung

{ name: string; callback: (event: TcHmi.Animation.AnimationEvent) => void; }[]

Ein Array aller registrierten Event Handler.

Beispiel – JavaScript

var animation = new TcHmi.Animation('ViewDesktopBeckhoffLogo', '');
var eventHandler = function (event) {
    console.log('Animation started: ' + event.animationName);
};
animation.registerEventHandler('animationstart', eventHandler);
var handlers = animation.eventHandlers(); // [{ name: 'animationstart', callback: f(event) }]
animation.unregisterEventHandler('animationstart', eventHandler);
handlers = animation.eventHandlers(); // []
eventHandlers 1:

Verfügbar ab Version 1.8