I have a situation here.
- I am inside a sourceful Iframe(
id=a-sourceful-one
) AND NOT on the main page - My code is executing in a script (
id=this-is-my-executing-script
) - I have to track clicks inside another sourceful iframe (
id=track-clicks-within-this-frame-for-mobiles
) - I am in mobile mode
Basically, I'm in mobile mode and inside a sourceful Iframe. I want to track clicks within another sourceful Iframe whose Iframe element is accessable to me.
Is there a way to achieve this?
I'm pretty sure that you can't catch events inside an iframe DOM unless you're on the same domain. You can however catch a event when clicking the actual iframe if you wrap the iframe inside a div and set the CSS property
pointer-events: none
to the iframe element.Something like this