Pinafore-Web-Client-Frontend/routes/_utils/doubleRAF.js

4 lines
92 B
JavaScript

export function doubleRAF (fn) {
requestAnimationFrame(() => requestAnimationFrame(fn))
}