Capítulo 49 de 411
eventCallback() gets or sets an event callback (onComplete, onUpdate, onStart, onReverseComplete, onRepeat, etc.) after the timeline already exists, instead of only at creation time.
| Parameter | Type | Default | Description |
|---|---|---|---|
type | String | — | callback name, case-sensitive (e.g. "onComplete") |
callback | Function | null | function to run |
params | Array | null | arguments to pass |
tl.eventCallback("onComplete", () => console.log("done"));
tl.eventCallback("onComplete"); // read the current callback back
vars object at creation.