getPropertyValue vs property

JavaScript performance comparison

Revision 2 of this test case created

Preparation code

<html>
    <head>
        <title>sds</title>
        <style type="text/css">input {color: red;}</style>
    </head>
    <body>
        <div>
            <div><input type="text"/></div>
        </div>
    </body>
</html>

Preparation code output

sds

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
getPropertyValue
window.getComputedStyle(document.querySelectorAll("input")[0], null).getPropertyValue("color");
pending…
property
window.getComputedStyle(document.querySelectorAll("input")[0], null).color;
pending…
property (one arg)
window.getComputedStyle(document.querySelectorAll("input")[0]).color;
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment