Closed Stefanuk12 closed 1 year ago
This is not at all feasible with the current implementation as the it requires a working DOM and JavaScript API for the SVG, CSS, and Canvas.
To the best of my knowledge this does not exist for node.js as a pure JS implementation (the stubs that exist in Jest are a joke and don't work at all - about 99.9% of the implementation is missing). Use a headless browser like Puppeteer instead if you want to work with SVG on the server in JavaScript.
Is your feature request related to a problem? Please describe. Currently, you must use an SVG element to use this package. This means if you are trying to do this with nodejs/on the server, you need to create a "pseudo-element" which I'm not sure would even work.
Describe the solution you'd like The function to support either an element or a string
Describe alternatives you've considered Use a "pseudo-element" for the SVG