combine multiple DOM and style

Benchmark created by Truong Nguyen on


Description

combine multiple DOM and style

Preparation HTML

<div id='div'>div</div>

Test runner

Ready to run.

Testing in
TestOps/sec
normal
var el = document.getElementById('div');
el.style.color = 'red';
el.style.font - weight = "bold";
el.style.font - size = '20';
ready
combine multiple DOM and style
var el = document.getElementById('div');
el.style.cssText = "color: red; font-weight: bold; font-size: 20";
ready

Revisions

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

  • Revision 1: published by Truong Nguyen on