Is there a reliable way to wait for the next render to complete, e.g. with a Promise?
My use case: I want to restart a CSS animation by removing and adding a class to