MCPcopy
hub / github.com/darkreader/darkreader / requestAnimationFrameOnce

Function requestAnimationFrameOnce

src/utils/throttle.ts:75–84  ·  view source on GitHub ↗
(token: symbol, callback: () => void)

Source from the content-addressed store, hash-verified

73const delayTokens = new Set<symbol>;
74
75export function requestAnimationFrameOnce(token: symbol, callback: () => void): void {
76 if (delayTokens.has(token)) {
77 return;
78 }
79 delayTokens.add(token);
80 requestAnimationFrame(() => {
81 delayTokens.delete(token);
82 callback();
83 });
84}

Callers

nothing calls this directly

Calls 2

addMethod · 0.80
hasMethod · 0.65

Tested by

no test coverage detected