title: Append canvas to document body using JS
body: <p>I am trying to add a canvas to my html document such that it is in position 0,0 and is overlayed above all other elements. I've done some research and by all means, I think I am doing the right thing:</p>
  
  <pre><code>canvas.style.position = "absolute";
  canvas.style.left = "0px";
  canvas.style.top = "0px";
  canvas.style.zIndex = "100";
  body.appendChild(canvas);
  </code></pre>
  
  <p>However, the canvas appears at the bottom of the document, rather than at the top left corner, above all elements. Absolute position and setting the coordinates should do the trick, no?</p>