Rectangle 27 0

javascript outerHtml is not working in IE?


new DOMParser().parseFromString(svgString, "image/svg+xml")
new XMLSerializer().serializeToString(document.querySelector('#b'))

Dont know if it is a solution for you but i usually do it like:

Evergreen browsers work with the outerHTML spec for SVGs, just not IE and company. This solution works great though. Thanks!

If you want to parse the string again and insert the node in your document:

Note