<!DOCTYPE html> | |
<html> | |
<body> | |
<div></div> | |
<script src="../resources/runner.js"></script> | |
<script> | |
PerfTestRunner.measureRunsPerSecond({ | |
description: "This benchmark covers 'getElementsByTagName (not in document)', 'getElementsByTagName', 'getElementsByName (not in document)' and 'getElementsByName' in Dromaeo/dom-query.html, and other DOM methods that return a NodeList.", | |
run: function() { | |
for (var i = 0; i < 50000; i++) | |
document.getElementsByTagName("div"); | |
}}); | |
</script> | |
</body> | |
</html> |