Skip to content

requestAnimationTick

requestAnimationTick(owner, ms, paintOnly?): void

Defined in: src/anim/animation.ts:157

Ask for a re-render roughly ms from now, on a macrotask. Animated widgets must use this instead of calling App.queueRender() from render() — that queues a microtask, and a render that always re-queues itself forms an unbroken microtask chain that starves timers and I/O.

paintOnly marks an animation that changes only appearance, never geometry (a breathing focus ring, an attention glow, a spinner glyph, a color tween). Such ticks request a Repaintable.queueRepaint, which reuses the prior layout instead of relaying out the whole tree every frame — the difference between a focused screen idling cheaply and re-measuring everything ~60×/s. Leave it false for scalar tweens that may drive size/scroll.

The re-render is dispatched on the owner’s own App (reached via owner.app), so multiple live apps — tests, the web backend — each drive their own tree. A detached owner (no app) is a no-op: there’s nothing to paint.

TickOwner

number

boolean = false

void