I try to create dynamic svg using javascipt
my result is
<svg xmlns='http://www.w3.org/2000/svg' viewBox='5279 1710 12.125 12.125'> <g transform='translate(4311 1165)'> <path fill='#fffff' d='M346.045,76.5a5.632,5.632,0,0,0,0,8.245,6.143,6.143,0,0,0,1.6-4.122A6' transform='translate(632.48 470.439)'/> </g> </svg> Js code to get the above image :
const svg1 = document.createElementNS('http://www.w3.org/2000/svg', 'svg') svg1.setAttribute('viewBox', '5279 1710 12.125 12.125') svg1.setAttribute('transform', 'translate(4311 1165)') svg1.setAttribute('fill', 'fffff') svg1.setAttribute('d', "M346.045,76.5a5.632,5.632,0,0,0,0,8.245,6.143,6.143,0,0,0,1.6-4.122A6'")