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 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0
Browser:
Firefox 141
Operating system:
Linux
Device Platform:
Desktop
Date tested:
11 months ago
Test name
Executions per second
style.prop
8021306.5 Ops/sec
style["prop"]
7546550.5 Ops/sec
style.getPropertyValue("prop")
4998120.5 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')