- Mixing rendering contexts (`<Svg>`, `<Canvas>`, etc) will make some options more difficult / impossible - Download as PNG - If using only `<Canvas>`, should be able to use: - [canvas.toDataURL()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL) - [canvas.toBlob()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob) - see also: https://stackoverflow.com/questions/11112321/how-to-save-canvas-as-png-image - [html2canvas](https://html2canvas.hertzen.com/) - https://dev.to/bibekkakati/take-screenshot-of-html-element-using-javascript-13b7 - [html-to-image](https://github.com/bubkoo/html-to-image) - Possible use [navigator.mediaDevices.getDisplayMedia()](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) (will prompt) - https://stackoverflow.com/questions/49605681/are-there-any-browser-provided-apis-to-capture-a-screenshot-of-the-dom-of-a-page - https://github.com/w3c/mediacapture-screen-share/issues/105 - https://github.com/w3c/mediacapture-screen-share/issues/107 - https://observablehq.com/@fil/canvas-plot - https://observablehq.com/@jcolot/observable-plot-canvas - https://github.com/qq15725/modern-screenshot - Leverage puppeteer (backend, round trip) - Download as SVG - If using only `<Svg>`, should be able to use: - `new XMLSerializer().serializeToString(svg)` - see also: https://stackoverflow.com/questions/28226677/save-inline-svg-as-jpeg-png-svg - Upscaling Canvas - Maybe provide a dedicated `DownloadCanvas` or create a new `Canvas` offscreen with higher container width/height overridden - See some [discussion](https://discord.com/channels/920755200552226868/1255566546714099796/1263499300877504573)
<Svg>,<Canvas>, etc) will make some options more difficult / impossible<Canvas>, should be able to use:<Svg>, should be able to use:new XMLSerializer().serializeToString(svg)DownloadCanvasor create a newCanvasoffscreen with higher container width/height overridden