Function waitForAnimationFrame

Returns a promise that resolves at the next animation frame. Async/await version of requestAnimationFrame.