OLD | NEW |
| (Empty) |
1 <sky> | |
2 <import src="/sky/benchmarks/resources/runner.sky" as="PerfRunner" /> | |
3 <import src="/sky/examples/city-list/city-list.sky" as="citylist" /> | |
4 <script> | |
5 var sky = document.querySelector("sky"); | |
6 var element; | |
7 | |
8 var CityListElement = citylist.CityListElement; | |
9 | |
10 var runner = new PerfRunner({ | |
11 setup: function() { | |
12 // Don't benchmark removal. | |
13 if (element) | |
14 element.remove(); | |
15 }, | |
16 iterations: 10, | |
17 unit: "ms", | |
18 }); | |
19 | |
20 runner.runAsync(function(done) { | |
21 element = new CityListElement(); | |
22 sky.appendChild(element); | |
23 element.addEventListener('load', function() { | |
24 done(); | |
25 }); | |
26 }); | |
27 </script> | |
28 </sky> | |
OLD | NEW |