HTMLCanvasElement.toDataURL() returns empty string

Description of the issue:
toDataURL() method of HTMLCanvasElement returns empty string.

Steps to Reproduce (add as many as necessary):

  1. Create a canvas element in HTML.
  2. Get a reference to that canvas element through JavaScript (e.g const canvas = document.getElementById('canvas')).
  3. Draw something to canvas (can be anything; rect, lines, arcs or image)
  4. Execute const dataURL = canvas.toDataURL().

Actual Result (gifs and screenshots are welcome!):
The returned value from canvas.toDataURL() is empty string.

Expected result:
The returned value from canvas.toDataURL() should not be empty string. It should be a string which represents proper data URL, which explained at MDN Website .

Reproduces how often:

Brave Version(about:brave):
Version 0.64.77 Chromium: 74.0.3729.169 (Official Build) (64-bit) (Windows)

Reproducible on current live release (yes/no):
Additional Information:

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.