I have an SVG element inside HTML document that I'd like to export as text.
I know HTML doesn't have namespace hence it doesn't honor one, that is probably why I lose namespace prefixes on my SVG element.
Are there ways to preserve it other than writing my own serializer?
Example code:
var s = new XMLSerializer();
var svg = document.getElementById('mySvg');
console.log(s.serializeToString(svg)); //All namespace prefixes are gone!
Edit: apparently this is Chrome's (tested on v17) bug.