title: Javascript - convert HTML div with SVG to image
body: <p>I use Highcharts to draw a graph.</p>
  
  <p>I want to add "export to PNG" option that includes both Highcharts graph and outer div. When using Highcharts export, I'm unable to add the outer div containing the chart.</p>
  
  <p>I saw several examples here using html2canvas. When I tried using it, the Highcharts' SVG element wansn't included in the output image.</p>
  
  <p>Does anyone know a solution, better than trying to merge SVG image inside outer HTML div image?</p>
  
  <p>Update -</p>
  
  <p>Using the latest version of html2canvas fixed that issue, however the output is slightly different:</p>
  
  <p>Original:
  <a href="https://i.stack.imgur.com/q5d20.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q5d20.png" alt="enter image description here"></a></p>
  
  <p>html2canvas output:</p>
  
  <p><a href="https://i.stack.imgur.com/hkYSd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hkYSd.png" alt="enter image description here"></a></p>
  
  <p>As you can see some elements are rendered twice in different locations.</p>
  
  <p>Anyone knows how to solve it?</p>