requestAnimationFrame()for code that animates a view over time.setImmediate/setTimeout()run code later, note this may delay animations.runAfterInteractions()run code later, without delaying active animations.
runAfterInteractions() callbacks until all touches have ended or been cancelled.
InteractionManager also allows applications to register animations by creating an interaction ‘handle’ on animation start, and clearing it upon completion:
runAfterInteractions takes either a plain callback function, or a PromiseTask object with a gen method that returns a Promise. If a PromiseTask is supplied, then it is fully resolved (including asynchronous dependencies that also schedule more tasks via runAfterInteractions) before starting on the next task that might have been queued up synchronously earlier.
By default, queued tasks are executed together in a loop in one setImmediate batch. If setDeadline is called with a positive number, then tasks will only be executed until the deadline (in terms of js event loop run time) approaches, at which point execution will yield via setTimeout, allowing events such as touches to start interactions and block queued tasks from executing, making apps more responsive.
Example
Basic
Advanced
InteractionManager.runAfterInteractions() is not working properly on web. It triggers immediately without waiting until the interaction is finished.

