(win, task, opt_state)
| 15 | * TODO(alanorozco): Figure out a longer-term solution |
| 16 | */ |
| 17 | export 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. |
no test coverage detected