Inside a repeat
On an element inside a repeat, the handler is called once per item,
and only for the items that actually rendered. When one row changes, only that row's handler runs again,
which is what makes this the right place to flash a highlight or animate a value.
The template item carries the item's context, so the handler knows which row it is dealing with without
needing an id on the element.
ctrl.flashUpdate = (templateItem) =>
{
let el = templateItem.element;
el.classList.remove('flash');
void el.offsetWidth; // restart the animation
el.classList.add('flash');
};