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

Function restrictedVsync

ads/inabox/util.js:17–26  ·  view source on GitHub ↗
(win, task, opt_state)

Source from the content-addressed store, hash-verified

15 * TODO(alanorozco): Figure out a longer-term solution
16 */
17export function restrictedVsync(win, task, opt_state) {
18 win.requestAnimationFrame(() => {
19 if (task.measure) {
20 task.measure(opt_state);
21 }
22 if (task.mutate) {
23 task.mutate(opt_state);
24 }
25 });
26}
27
28/**
29 * Executes a function after a certain time.

Callers 3

expandFrameImplFunction · 0.90
mutateFunction · 0.90
collapseFrameImplFunction · 0.90

Calls 2

measureMethod · 0.45
mutateMethod · 0.45

Tested by

no test coverage detected