aboutsummaryrefslogtreecommitdiffstats
path: root/bench/svg.bench.js
diff options
context:
space:
mode:
Diffstat (limited to 'bench/svg.bench.js')
-rw-r--r--bench/svg.bench.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/bench/svg.bench.js b/bench/svg.bench.js
index 3f12f30..653d438 100644
--- a/bench/svg.bench.js
+++ b/bench/svg.bench.js
@@ -6,6 +6,7 @@
, _before: function() {}
, _after: function() {}
, draw: SVG('draw')
+ , raw: document.getElementById('native')
// Add test
, test: function(name, closure) {
@@ -45,7 +46,10 @@
this.write( this._tests[i].name, ( new Date ).getTime() - s )
// run after
- this._after(this._tests[i])
+ this._after(this._tests[i])
+
+ // clear everything
+ this.clear()
}
}
@@ -71,6 +75,13 @@
return pad
}
+
+ // Clear canvasses
+ , clear: function() {
+ while(this.raw.hasChildNodes())
+ this.raw.removeChild(this.raw.lastChild)
+ this.draw.clear()
+ }
}
})(); \ No newline at end of file