How to detect a click from iframe for specific div? Alternatively, for a bit more context: Best way t

16 Replies, 1715 Views

Hey! For detect a click from iframe for specific div, you could try using `MutationObserver` to watch for changes in the iframe’s DOM, but it’s messy and might not work cross-origin.

If you control the iframe, `postMessage` is your best bet. If not, you’re fighting an uphill battle against browser security.

Maybe try embedding the content differently? Like an API fetch instead of an iframe.

Messages In This Thread



Users browsing this thread: 1 Guest(s)