rsify / pico

Take browser screenshots in Javascript 📸
MIT License
1.96k stars 45 forks source link

Option to ignore cloning certain nodes #3

Closed rsify closed 4 years ago

rsify commented 4 years ago

Sometimes you might want to hide certain parts of the DOM from being rendered out, e.g. Gripeless' SDK embeds a full screen overlay that is not desired to be shown in the image output.

Potential solution would be taking in a CSS selector (or an array of) and removing matched nodes from the cloned DOM tree.


Unfortunately, because we use recursive cloning via document.cloneNode(true) so there'd be no performance benefits other than resources nested under the ignored node not having to be downloaded.

rsify commented 4 years ago

Fixed