Check hidden (v9)

Revision 9 of this benchmark created on


Preparation HTML

<div>
    <div id="test">Hello there</div>
</div>

Setup

var el = document.getElementById("test");

Test runner

Ready to run.

Testing in
TestOps/sec
el.offsetParent
var x = el.offsetParent;
ready
currentStyle
var x;
if (el.currentStyle)
        var x = el.currentStyle['display'];
    else if (window.getComputedStyle)
        var x = document.defaultView.getComputedStyle(el,null).getPropertyValue('display');
ready

Revisions

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