cssText with unnown properties (v2)

Revision 2 of this benchmark created by Mircea Piturca on


Preparation HTML

<div id="test">test</div>
<script>
  var elStyle = document.getElementById('test').style;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
normal
elStyle.cssText = 'background:red;'
ready
adding unknown properties
elStyle.cssText = 'background:red; -moz-foo:baa;'
ready
One call
elStyle.cssText = '-moz-foo:baa;'
ready
Wrong value
elStyle.cssText = 'background:hslb(0,0,0,1);'
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Tobias on
  • Revision 2: published by Mircea Piturca on
  • Revision 3: published by Tobias on