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

Threads not closing after converting DOM to image #98

Open MartinTiangco opened 3 weeks ago

MartinTiangco commented 3 weeks ago

Steps To Reproduce

  1. Get dataURL from a node
  2. Firefox debugger indicates a new thread being started for each invocation of domToJpeg, which doesn't close.

Playground for https://codesandbox.io

Click the button titled "Get dataURL for title" and inspect the threads in Firefox devtools. Notice there is a new thread everytime you press on the button. This thread does not close after retrieving the dataURL.

https://github.com/qq15725/modern-screenshot/assets/50017873/23cae88b-5fb1-4da7-b07e-ae7c3ca40493

Your Environment