blob: 3795428eec51c908caaa9e7d0bfdbdaede076458 [file] [log] [blame]
<!DOCTYPE html>
<!-- Identical to "append-child.html" but having 100 active ranges -->
<body>
<pre id="log"></pre>
<script src="../resources/runner.js"></script>
<div id="sandbox" style="display:none"></div>
<script>
var elems = [];
for (var i = 0; i < 50000; ++i)
elems[i] = document.createElement('div');
var ranges = [];
for (var i = 0; i < 100; ++i) {
var range = new Range();
ranges[i] = range;
range.selectNodeContents(document.body);
}
var sandbox = document.getElementById('sandbox');
PerfTestRunner.measureRunsPerSecond({
description: 'Measures performance of appendChild with active Range objects',
run: function() {
for (var elem of elems)
sandbox.appendChild(elem);
}
});
</script>
</body>