Home | History | Annotate | Download | only in Bindings
      1 <!DOCTYPE html>
      2 <html>
      3 <body>
      4 <script src="../resources/runner.js"></script>
      5 <script>
      6 var div = document.createElement("div");
      7 var childDiv = document.createElement("div");
      8 
      9 PerfTestRunner.measureRunsPerSecond({
     10     description: "This benchmark covers 'appendChild' and 'removeChild' in Dromaeo/dom-modify.html.",
     11     setup: function() {
     12         div.innerHTML = "";
     13     },
     14     run: function() {
     15         var localDiv = div;
     16         var localChildDiv = childDiv;
     17         for (var i = 0; i < 50000; i++)
     18             localDiv.appendChild(localChildDiv);
     19 }});
     20 </script>
     21 </body>
     22 </html>
     23