tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.28k stars 1.68k forks source link

I'm getting error,if there is SVG image on DOM. #266

Open OComert opened 5 years ago

OComert commented 5 years ago

Use case: description, code

if there is SVG image on DOM, i am getting error following. domtoimage.toJpeg(document.body, { quality: 1 }) .then(function (dataUrl) { // });

jsfiddle

Expected behavior

As the other type image,i am expecting to take screenshot succesfully.

Actual behavior (stack traces, console logs etc)

Uncaught (in promise) in console capture

Library version

2.6.0

Browsers

IAmRC1 commented 4 years ago

Error confirmed, using the latest version of library and browser!

istoan commented 3 years ago

Have you found a solution for this SVG problem?

palmerye commented 3 years ago

Have you found a solution for this SVG problem?

istoan commented 3 years ago

I am currently transforming all my SVG files into images and them add them to the DOM and this works perfectly fine.