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 9
9
</ head >
10
10
< body >
11
11
< 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 >
12
22
</ body >
13
23
</ html >
Original file line number Diff line number Diff line change 7
7
</ head >
8
8
< body >
9
9
< 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 >
10
20
< script type ="module " src ="/src/main.tsx "> </ script >
11
21
</ body >
12
22
</ html >
You can’t perform that action at this time.
0 commit comments