You can use the img tag and edit the SVG using the document model. All that is required is a little thought. I am working on a similar issue where svg text should be editable, so I needed mouseclick to activate the edit.
If you want your SVGs to be clickable, the object tag is NOT capable. It redirects all events to its contents, and placing a transparent div on top of it is impossible, since the object automatically becomes the top element, so the object you embed can always receive mouse events. (I think a flash player).
What you can do is convert your svgs using XMLSerializer and createObjectURL to blob, which can then be displayed as img tags using the following: mysvg is an SVG that has been downloaded and parsed as an XML document with xhttp:
var mysvg = xhttp.responseXML; var xml2str = new XMLSerializer(); var svg_blob = new Blob([xml2str.serializeToString(mysvg)],{'type': "image/svg+xml"}); var url = URL.createObjectURL(svg_blob); document.getElementById("svg1").src = url;
svg1 is an img tag that will gladly accept any event handlers you want to use.
source share