registerEventHandler
[ Function ]
public registerEventHandler(
name: 'animationstart' | 'animationend' | 'animationiteration',
callback: (event: TcHmi.Animation.AnimationEvent) => void
): this;Registers a callback for an animation event.
Parameter
Name | Type | Description |
|---|---|---|
name | The name of the event.
| |
callback | (event: TcHmi.Animation.AnimationEvent) => void | The function to be called when the event occurs. |
Return value
Type | Description |
|---|---|
This method returns its parent object to allow concatenation of method calls. |
Sample - JavaScript
var animation = new TcHmi.Animation('ViewDesktopBeckhoffLogo', '');
animation.registerEventHandler('animationstart', (event) => console.log('Animation started: ' + event.animationName));![]() | Available from 1.8 |
