TAG
JavaScript
Result
Run
License
<svg id="sprite" width="640" height="480" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <g> <title>Layer 1</title> <polygon stroke-width="5" stroke="#000000" points="306,103.7834701538086 336.8508605957031,192.53743743896484 430.7943420410156,194.4518585205078 355.917724609375,251.21925354003906 383.12713623046875,341.1564025878906 306,287.4866180419922 228.87286376953125,341.1564025878906 256.08226013183594,251.21925354003906 181.2056655883789,194.4518585205078 275.1491394042969,192.53743743896484 306,103.7834701538086 336.8508605957031,192.53743743896484 " strokeWidth="5" strokecolor="#000000" fill="#FF0000" orient="point" r2="52.48661" r="131.21653" point="5" shape="star" id="svg_1" cy="144" cx="237"/> </g> </svg>
window.addEventListener("load", function() { const elSvg = document.getElementById("sprite"); const iterAttr = elSvg.attributes[Symbol.iterator](); for(attr of iterAttr) { console.log(attr.namespaceURI); } });
Console
expand_less
License
License
by DevDic
Close