qq15725 / modern-screenshot

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

Fetch and embed any external svg's from use-tags #46

Closed strindhaug closed 12 months ago

strindhaug commented 1 year ago

Description

A complete fix for https://github.com/qq15725/modern-screenshot/issues/43

I figured out a way to fetch and embed the external svg-files so that both local and external references work. Everything seems to work when I run the tests, and I'm pretty sure I'm only modifying cloned elements.

I changed the test a bit to to check that it behaves correctly with regards to preferring "href" over "xlink:href" too.


What is the purpose of this pull request?

Before submitting the PR, please make sure you do the following

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
modern-screenshot ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2023 8:33am