Hi @kopkacobana
This is difficult, especially if the iframe is on a different domain.
An event happening in the iframe will bubble up, but only as far as the body tag (so still within the iframe). Which means you can't add a listener to the parent document.
If you can add code to the page in the iframe, then you could try triggering an event on the window using
$(window).trigger("eventname")
and then adding the listener via an extension on the parent, using
$(window).on("eventname", function() { ... stuff... });
I have done something a bit hacky in the past where i used an onmouseover handler on the iframe element, and then within that function body I added another event handler for something within the iframe. I can't really remember the details but it seemed to work reasonably reliably.
... View more