image event onload testing

JavaScript performance comparison

Test case created

Info

DOM-0 or DOM-2 for image onload ?

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var img = new Image();
};
</script>

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
DOM-0
img.onload = function()
{
      console.log("test");
}
pending…
DOM-2
img.addEventListener("load", function()
{
      console.log("test");
});
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