vdvrbrrgrgeg

JavaScript performance comparison

Test case created

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
v
dd
pending…
ddv
"use strict";
(function() {
  function t(t, n, r) {
    var i = getComputedStyle(n);
    if (e) t.style.cssText = i.cssText;
    else
      for (var s in i) isNaN(parseInt(s, 10)) && typeof i[s] != "function" && !/^(cssText|length|parentRule)$/.test(s) && (t.style[s] = i[s])
  }

  function n(e, n) {
    var r = e.querySelectorAll("*"),
      i = n.querySelectorAll("*");
    t(e, n, 1), Array.prototype.forEach.call(r, function(e, n) {
      t(e, i[n])
    }), e.style.margin = e.style.marginLeft = e.style.marginTop = e.style.marginBottom = e.style.marginRight = ""
  }
  var e = getComputedStyle(document.body).cssText !== "";
  window.domvas = {
    toImage: function(e, t, r, i, s, o) {
      s = s || 0, o = o || 0;
      var u = e.cloneNode(!0);
      n(u, e), u.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
      var a = (new XMLSerializer).serializeToString(u),
        f = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='" + ((r || e.offsetWidth) + s) + "' height='" + ((i || e.offsetHeight) + o) + "'>" + "<foreignObject width='100%' height='100%' x='" + s + "' y='" + o + "'>" + a + "</foreignObject>" + "</svg>",
        l = new Image;
      l.src = f, l.onload = function() {
        t && t.call(this, this)
      }
    }
  }
})()
pending…

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

Compare results of other browsers

0 comments

Add a comment