MCPcopy Create free account
hub / github.com/ampproject/amphtml / flushableRaf

Function flushableRaf

testing/preact.js:21–24  ·  view source on GitHub ↗

* @param {(ts: (DOMHighResTimeStamp) => number)} cb * @return {number}

(cb)

Source from the content-addressed store, hash-verified

19 * @return {number}
20 */
21function flushableRaf(cb) {
22 rafs.push(cb);
23 return requestAnimationFrame(flushRaf);
24}
25
26function flushRaf(ts = performance.now()) {
27 for (const raf of rafs) {

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected