Create Button to copy Plot as image to clipboard

I’m using Observable Framework to create a dashboard, and I want to allow users to be able to copy a barplot to the clipboard by clicking an Input button.

I can’t seem to find appropriate examples or code to do this? (There must be a way since in Notebooks, you can click on the left-side context menu for each cell and download plots as PNG or SVG.)

I know that in the Plot docs there’s instructions for doing somehting similar across different Javascript frameworks: Getting started | Plot. Anyway to do something like that in Framework itself?

Thanks in advance.

See Button to copy Plot as image to clipboard · observablehq/plot · Discussion #2316 · GitHub