eventHandlers

[ Function ]

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

Returns all registered event handlers.

Parameter

Name

Type

Description

-

-

-

Return value

Type

Description

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

An array of all registered event handlers.

Sample - 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:

Available from 1.8