Schedule a micro task for updatingInternal() after adding an animation. If updateInternal() runs in the same task then animation.currentTime will be set by the time animation.play() returns.
Delaying this function revealed two other issues that needed to be fixed:
Infinite durations needed to be validated in getTimingHandler.
holdTime was set to unresolved in tickAnimation, flipping the playState from 'finished' to 'running'.
Schedule a micro task for
updatingInternal()
after adding an animation. IfupdateInternal()
runs in the same task thenanimation.currentTime
will be set by the time animation.play() returns.Delaying this function revealed two other issues that needed to be fixed: