Closed MShwed closed 5 years ago
I've been testing creating SVG and found an issue with attributes being duplicated.
const document = new nodom.Document(); let svg = document.createElement("svg"); svg.setAttribute("width", "100%"); svg.setAttribute("height", "100%"); svg.setAttribute("viewBox", "0 0 500 500"); console.log(svg.outerHTML);
Will result in :
<svg width="100%" height="100%" viewBox="0 0 500 500" width="100%" height="100%" viewBox="0 0 500 500"></svg>
I can confirm this, nodom really does duplicate attributes.
nodom
Here’s the code if someone wants to take a look: https://github.com/redom/nodom/blob/master/lib/element.js
I’ll get back to this..
I've been testing creating SVG and found an issue with attributes being duplicated.
Will result in :