title: Using html2Canvas to capture SVG image
body: <p>I'm using <a href="https://html2canvas.hertzen.com/" rel="nofollow noreferrer">html2Canvas</a> library and trying to make a screenshot of a SVG with this code:</p>
  
  <pre><code>var svgElements= $container.find('svg');
  svgElements.each(function (){
      var canvas, xml;
  
      canvas = document.createElement("canvas");
      canvas.className = "screenShotTempCanvas";
      //convert SVG into a XML string
      xml = (new XMLSerializer()).serializeToString(this);
      xml = xml.replace(/xmlns=\"http:\/\/www\.w3\.org\/2000\/svg\"/, '');
      canvg(canvas, xml);
      $(canvas).insertAfter(this); 
  
      this.className"tempHide";
      $(this).hide();
  }); 
  $container.find('.screenShotTempCanvas').remove(); 
  $container.find('.tempHide').show().removeClass('tempHide');
  </code></pre>
  
  <p>but my problem is that I have a input (foreignObject) inside the svg. The screenshot that it takes, contains only the svg elements. Anyone has a solution for this? How I can I capture all the elements on page?</p>
  
  <p>Thank!</p>