ClassList versus ClassName (v14)

Revision 14 of this benchmark created on


Preparation HTML

<style>
    .test {color:red }
</style>

<div id="dom">
    test
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
Class List
document.getElementById("dom").className = "test";
ready
Raw Class Name
document.getElementById("dom").classList.add("test");
ready

Revisions

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