title: How to save/export a DOM element to an image?
body: <p>I have a web page which has a form element (with its ID known) and
  inside the form there are multiple DIVs, and the position of each div
  may be changed.</p>
  
  <p>What I'd like to do is:</p>
  
  <p>a) Save the current state of this form</p>
  
  <pre><code>// var currentForm=document.forms['myFrm'].innerHTML;
  </code></pre>
  
  <p>would probably suffice...</p>
  
  <p>b) Save or export the entire form with the most current position of each DIV
  to an image file.</p>
  
  <p>// how to save/export the javascript var of currentForm to an image
  file is the key question.</p>
  
  <p>Any help/pointer would be appreciated.</p>