Open cWenyu opened 1 month ago
👋 @cWenyu
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Missing default slot content and progress element styling
I have a sample page that includes basic HTML elements, shadow dom, slots, and a progress bar, and I want to convert the DOM element into an image but the result is wrong. The default content (text, div) inside the slot is missing and also the styling of the progress bar is wrong.
Expected Behavior
Convert the default slot content and capture the progress bar styling, as image below:
Current Behavior
Possible Solution
To solve the content inside the slot, need to check if the slot element has child elements and attach theme to children Array: https://github.com/bubkoo/html-to-image/blob/128dc3edfde95d6ac636f2756630f5cbd6f7c8df/src/clone-node.ts#L78
I don't have the solution yet for the progress bar.
Steps To Reproduce
Copy the following code into index.html and open the file in Chrome or Firefox, click button, and an image will be downloaded.
Your Environment