I have created a div
, and within that div
, I referenced a SVG image via object
(I want to manipulate that SVG image later on...).
<div id="click-me">
some needless Text
<object data="some.svg" />
</div>
And then I register some event handlers on the click
event:
document.getElementById('click-me').addEventListener('click', function(event) {
console.log("Click handled");
});
Now the following happens: The registered click handler do work perfectly on the text, but do now work on the SVG image.
Am I doing something in a wrong way? What do I oversee?
Here is the Plunk: http://plnkr.co/edit/TZm7MxSfiwswz01HCwA9?p=info