Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0
Firefox 108
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
style.setProperty 8.6 Ops/sec
style.cssText 22.7 Ops/sec
style replace 21.5 Ops/sec
Object.assign 8.2 Ops/sec
setAttribute 354.1 Ops/sec
style update 7.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • style.setProperty

  • style.cssText

  • style replace

  • Object.assign

  • setAttribute

  • style update