<!DOCTYPE html> <script> function boom() { var d = document.createElementNS("http://www.w3.org/1999/xhtml", "div"); d.style.setProperty("-moz-transform", "translate(0pt, 10px)", ""); d.style.setProperty("opacity", "0.8", ""); d.style.setProperty("background-color", "gray", ""); var c = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); (d).appendChild(c); (document.body).appendChild(d); c.getContext("2d"); } </script> <body onload="setTimeout(boom, 100);"></body>