tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.34k stars 1.68k forks source link

[Feat] Included Shadow DOM & First-line PseudoElement #370

Open pvillaverde opened 3 years ago

pvillaverde commented 3 years ago

Greetings!

I needed to create an image from an Ionic application, which uses WebComponents with its ShadowDOM. So I made a change to check if the element has ShadowDOM, use its childrens, otherwise as it were.

I also added the CSS :first-line pseudoElement

jfbloom22 commented 3 years ago

This is exactly the solution I am looking for. Has anyone tested this out successfully?

ghost commented 2 years ago

Is this library no longer maintained ?

zm-cttae commented 1 year ago

De-facto yes @bacloud23. If you want Typescript, html-to-image. If you don't need it and want heavy optimisation, dom-to-image-more.

ghost commented 1 year ago

thanks a lot 😁