Ajax Import of SVG into XHTML works in Opera, FF, but not in Chrome or Safari -- WHY?
Hi, Everyone!
The following works in Opera (v. 11.01) and FF, but not in Chrome or Safari:
$.ajax({
url:"data/embed_si_006ped.xml",
dataType:"text",
success:function(data){
var nodes = new DOMParser().parseFromString(data,'text/xml').documentElement;
//alert(nodes);
//
// Works in Opera (v. 11.01) and Firefox but not in Chrome or Safari:
//
svgContainer.append(nodes);
});
Uncommenting the "alert(nodes)" statement shows that the nodes are of type "[object SVGSVGElement]" in all 4 browsers (OP,FF,CH,SF) but in the webkit-based browsers, the nodes are not appended to the svgContainer.
Anyone have an idea why and how to work around this problem? Thanks! - Ed