aboutsummaryrefslogtreecommitdiffstats
path: root/bench/tests/10000-textContent.js
diff options
context:
space:
mode:
Diffstat (limited to 'bench/tests/10000-textContent.js')
-rw-r--r--bench/tests/10000-textContent.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/bench/tests/10000-textContent.js b/bench/tests/10000-textContent.js
index 9a02308..cb0df77 100644
--- a/bench/tests/10000-textContent.js
+++ b/bench/tests/10000-textContent.js
@@ -1,21 +1,21 @@
-SVG.bench.describe('Change textContent 10000 times', function(bench) {
- var data = 'M 100 200 C 200 100 300 0 400 100 C 500 200 600 300 700 200 C 800 100 900 100 900 100'
+SVG.bench.describe('Change textContent 10000 times', function (bench) {
+ var data =
+ 'M 100 200 C 200 100 300 0 400 100 C 500 200 600 300 700 200 C 800 100 900 100 900 100'
var node = bench.draw.plain('').node
-
- bench.test('using appendChild', function() {
+ bench.test('using appendChild', function () {
for (var i = 0; i < 1000000; i++) {
while (node.hasChildNodes()) {
node.removeChild(node.lastChild)
}
- node.appendChild(document.createTextNode('test'+i))
+ node.appendChild(document.createTextNode('test' + i))
}
})
- bench.test('using textContent', function() {
+ bench.test('using textContent', function () {
for (var i = 0; i < 1000000; i++) {
- node.textContent = 'test'+i
+ node.textContent = 'test' + i
}
})
})