Pablo is a lightweight, expressive JavaScript SVG library. Pablo creates interactive drawings with SVG (Scalable Vector Graphics), giving access to all of SVG's granularity and power.
var e = document.createElement('div');
e.innerHTML = '<svg></svg>';
return !!('SVGSVGElement' in window && e.firstChild instanceof window.SVGSVGElement);
If supported, use it to innerHTML the markup.
If not, create a new document in either an iframe or an object, then importNode from the iframe/object's document to the current window's document.
Detect if SVG in text/html is supported, with a modification of this check: http://diveintohtml5.info/everything.html#inline-svg
If supported, use it to innerHTML the markup.
If not, create a new document in either an iframe or an object, then importNode from the iframe/object's document to the current window's document.