• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html>
2<html>
3<body>
4<script src="../resources/runner.js"></script>
5<script>
6var div = document.createElement("div");
7div.appendChild(document.createElement("div"));
8
9PerfTestRunner.measureRunsPerSecond({
10    description: "This benchmark covers 'firstChild', 'lastChild', 'nextSibling' and 'previousSibling' in Dromaeo/dom-traverse.html, and other DOM attributes that return a Node object.",
11    run: function() {
12        var localDiv = div;
13        for (var i = 0; i < 100000; i++)
14            localDiv.firstChild;
15}});
16</script>
17</body>
18</html>
19