qq15725 / modern-screenshot

📸 Quickly generate image from DOM node using HTML5 canvas and SVG
https://www.toolpkg.com/image/html-to-image
MIT License
457 stars 32 forks source link

Add option to selectively include style properties when cloning element #62

Closed aeharding closed 7 months ago

aeharding commented 7 months ago

Hello!

I have an optimization on my fork called includeStyleProperties. It can be passed a list of CSS properties that will be copied over during node cloning.

This can improve performance 2 times or more in my use (however, you have to specify all CSS properties, so it is really for performance critical situations only). It is inspired from this pull request.

If you are open to adding support for this feature, I will make a PR. :) Please let me know.

qq15725 commented 7 months ago

Of course you can 🚀