I'm using the Screenshot package to capture a screenshot of my custom widget and save the image to a page state variable. I have it working just fine, but only because I'm calling the capture method from within the widget with a button.
I would like to do the capture from an existing button on the page.