I want to embed a web page in to my website and be able to listen for clicks on the element.
<object id="test" class="col-xs-12 col-md-10" type="text/html" data="http://validator.w3.org/" style="margin-top: -5px;" height="580px">Your browser sucks!</object>
- I have tried adding onclick to it. I have tried using .click function event in script.
- I have tried wrapping the
<object>
in a<div>
but any clicks in the<object>
are not seen. - I have even used body and window click functions - it's as if
<object>
element no longer exists on my website, only clicks outside the<object>
work. - The same behaviour also happens on iframes.