CSS Repaint

Benchmark created by Josh on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="foo">

Test runner

Ready to run.

Testing in
TestOps/sec
getComputedStyle
var el = document.querySelector('#foo');
window.getComputedStyle(el, null).getPropertyValue('left');
ready
offsetHeight
var el = document.querySelector('#foo');
el.offsetHeight;
ready
Resize
$(window).trigger('resize');
ready

Revisions

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