Inline style vs CSS class (v23)

Revision 23 of this benchmark created by Inline style vs CSS class (more styles) on


Preparation HTML

<style rel='stylesheet'>
  .test { color: #f66; border: 1px solid red;   }
</style>

Setup

var node = document.createElement('div');

Teardown



            document.body.removeChild(node);
        
  

Test runner

Ready to run.

Testing in
TestOps/sec
Inline style
node.style.color = '#f66';
node.style.border = '1px solid red';
document.body.appendChild(node);
ready
CSS class
node.className = 'test';
document.body.appendChild(node);
ready

Revisions

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