File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
resources/tentative/todomvc-react-18 Expand file tree Collapse file tree 2 files changed +22
-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.
19+ window . setImmediate = ( cb ) => {
20+ Promise . resolve ( ) . then ( ( ) => cb ( ) ) ;
21+ } ;
22+ </ script >
1223 </ body >
1324</ 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.
17+ window . setImmediate = ( cb ) => {
18+ Promise . resolve ( ) . then ( ( ) => cb ( ) ) ;
19+ } ;
20+ </ script >
1021 < script type ="module " src ="/src/main.tsx "> </ script >
1122 </ body >
1223</ html >
You can’t perform that action at this time.
0 commit comments