Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
style.prop vs style["prop"] vs style.getPropertyValue("prop")
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0
Browser:
Firefox 128
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
style.prop
34873472.0 Ops/sec
style["prop"]
33078574.0 Ops/sec
style.getPropertyValue("prop")
18987708.0 Ops/sec
HTML Preparation code:
<div id="test" style="background-color: red;"></div>
Script Preparation code:
el = document.getElementById("test");
Tests:
style.prop
el.style.backgroundColor
style["prop"]
el.style['background-color']
style.getPropertyValue("prop")
el.style.getPropertyValue('background-color')