var childCount = 1000;
for (var i = 0; i < childCount; ++i)
nodes.push(document.createTextNode('A quick brown fox jumps over the lazy dog.\n'));
-PerfTestRunner.measureRunsPerSecond({run: function() {
- for (var i = 0; i < childCount; ++i)
- container.appendChild(nodes[i]);
- container.innerHTML = '';
-}});
+
+PerfTestRunner.measureRunsPerSecond({
+ description: "Measures performance of adding text nodes to a textarea, then clearing it.",
+ run: function() {
+ for (var i = 0; i < childCount; ++i)
+ container.appendChild(nodes[i]);
+ container.innerHTML = '';
+ }
+});
</script>
</body>