js take screenshot on a part on a canvas code example
Example 1: take a screenshot javascript of canvas
canvas.toDataURL('png')
Example 2: take a screenshot javascript of canvas
<a href="%dataURI%" download>download</a>
canvas.toDataURL('png')
<a href="%dataURI%" download>download</a>