blob: af48dedff94ae78c05f1ca949b5937aef88ff978 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../resources/runner.js"></script>
<script>
var element;
PerfTestRunner.measureTime({
description: "Measures performance of changing a DOM element's className property.",
setup: function() {
element = document.createElement('div');
},
run: function() {
for (var i = 0; i < 500000; ++i) {
element.className = 'class1';
element.className = 'class2';
}
}
});
</script>
</body>
</html>