how to take a screenshot of the canvas in javascript 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>