a HTMLCanvasElement method that returns the data URI value of a canvas element
HTMLCanvasElement.toDataURL() is a method that returns the data-uri value of a canvas element as a string.
Parameters
HTMLCanvasElement.toDataURL() accepts to optional parameters:
- type: specifies the image type to be returned
- encoderOptions: specifies the quality of the image to be returned