Closed g1aurav closed 6 years ago
I don't know of any workaround. Can you confirm that it's caused by the foreignObject by removing it and seeing if the SecurityError goes away?
It doesn't throw any error anymore but the png isn't downloaded either. Download works in this case too on chrome.
I'm getting this error on images with data URLs, which I believe might be rendered by the new font-handling code, as they're normal images in my SVG.
Images are inlined to data URLs, otherwise they aren't included in the final PNG.
It's possible that it is caused by custom font handling. To verify, please roll back to 3478b865304ff62d2316e663f928902d8eca8a2c and see if the error is there as well.
Closing due to inactivity.
I am calling the saveSvgAsPng in my javascript like this
saveSvgAsPng(dashboardVm.chartSvg, "diagram.png", {backgroundColor: 'white'})
. It works fine on chrome and I am able to download the png, but on safari 9 I get this error,Error: SecurityError: DOM Exception 18
. I have a foreignObject element in my svg and I think it is causing this problem. Is there a workaround for this issue?