javascript - is it possible to append a div inside svg element -


i trying append html div inside svg, trying create graph. trying append using code below, when inspect element using firebug.. div shown inside "rect" element code, doesnt show in graph ui. wrng method trying or sit imposible append div inside svg?

        marker.append("rect").attr("width", "50px").attr("height", "50px").append("div").attr("id", function (d) {             return "canvas_" + d.key.split(" ").join("_");         }).style("width", "50px").style("height", "50px"); 

you can't append html svg (technically can foreignobject, it's rabbit hole). furthermore, visible elements in svg can't nested, elements such circle, rect, path , such can't have children elements.


Comments