File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
resources/tentative/todomvc-react-18 Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 99 </ head >
1010 < body >
1111 < div id ="root "> </ div >
12+ < script >
13+ // Because the benchmark runner can't easily capture work happening in
14+ // a rAF, let's mock it as a setTimeout instead.
15+ window . requestAnimationFrame = ( cb ) => window . setTimeout ( cb , 0 ) ;
16+ // We also define a setImmediate to use a microtask, so that some
17+ // work that wouldn't be captured by our benchmark runner is
18+ // now properly captured. This isn't a perfect polyfill but good
19+ // enough for this workload.
20+ window . setImmediate = window . queueMicrotask ;
21+ </ script >
1222 </ body >
1323</ html >
Original file line number Diff line number Diff line change 77 </ head >
88 < body >
99 < div id ="root "> </ div >
10+ < script >
11+ // Because the benchmark runner can't easily capture work happening in
12+ // a rAF, let's mock it as a setTimeout instead.
13+ window . requestAnimationFrame = ( cb ) => window . setTimeout ( cb , 0 ) ;
14+ // We also define a setImmediate to use a microtask, so that some
15+ // work that wouldn't be captured by our benchmark runner is
16+ // now properly captured. This isn't a perfect polyfill but good
17+ // enough for this workload.
18+ window . setImmediate = window . queueMicrotask ;
19+ </ script >
1020 < script type ="module " src ="/src/main.tsx "> </ script >
1121 </ body >
1222</ html >
You can’t perform that action at this time.
0 commit comments