pts icon indicating copy to clipboard operation
pts copied to clipboard

Implement a download function

Open williamngan opened this issue 2 years ago • 2 comments

williamngan avatar Dec 12 '21 19:12 williamngan

I've done some work in trying to implement this. There are some complications due to some security issues of downloading embedded objects (I believe canvases which are in svgs may not be automatically inserted), and text/DOM and particularly <foreignObjects> elements may give issues.

see: https://observablehq.com/@mbostock/saving-svg and : https://observablehq.com/@mootari/embed-canvas-into-svg and : https://stackoverflow.com/questions/39148582/javascript-todataurl-throwing-security-error-tainted-canvases-may-not-be-ex/39150005

HenrySkup avatar Mar 08 '22 05:03 HenrySkup

Interesting. Thanks for the great info @HenrySkup . I'm reopening this issue so that we don't lose track of this.

williamngan avatar Mar 08 '22 09:03 williamngan