Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
style.prop vs style["prop"] vs style.getPropertyValue("prop")
(version: 1)
Comparing performance of:
style.prop vs style["prop"] vs style.getPropertyValue("prop")
Created:
one year ago
by:
Registered User
Jump to the latest result
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')
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
style.prop
style["prop"]
style.getPropertyValue("prop")
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
11 months ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0
Browser/OS:
Firefox 141 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
style.prop
8021306.5 Ops/sec
style["prop"]
7546550.5 Ops/sec
style.getPropertyValue("prop")
4998120.5 Ops/sec
Comments
Confirm delete:
Do you really want to delete benchmark?