How to load an arbitrary page for screenshots
Opened this issue · 0 comments
This isn't really a bug or a feature request, I just have an incredibly basic question. Hopefully someone is still watching this repo.
I have everything working just fine, and it's all in a React app. I've got the following line:
const screenshot = (await Pico.dataURL(window, {})).value;
and "screenshot" is then the image of the currently-open page when I click a button set up to do the screenshot.
The question is how do I get it to work on some arbitrary page? The examples for the library show wikipedia - how was that accomplished? I've tried doing something like "let arbitraryWindow = window.open("https://wikipedia.org")" and then running Pico on arbitraryWindow but that does not work. I'm sure this is something incredibly simple. Thanks for any help.