0

I have a multiuser environment where if any user makes any change to the page I broadcast it to the other users. Recently I have integrated iframe for embedding third-party websites. How can I detect changes from inside an iframe so that I can broadcast that in the same fashion?

For example, let's say I have an embedded iframe of Google Maps. If one user pans the map I want this action to be broadcasted to other users as well so that all the user sees the same thing. How can I achieve this?

Raj
  • 417
  • 1
  • 3
  • 17
  • Perhaps [this](https://stackoverflow.com/questions/15029790/how-to-interact-with-the-content-of-an-iframe-using-js-or-jquery) might help? You probably can't interact with a Google Maps iFrame since it's not in the same domain scope as your page. – filipe Aug 27 '22 at 07:49
  • @filipe I have found lots of these comments and issues previously created. However, they all work if and only if the domain is the same. I would like to do it for any third-party website that enables us to embed their iframe on our website, e.g. Google Maps, Youtube, Slideshare, etc. I'd like to know if there is any way to achieve this. – Raj Aug 27 '22 at 07:53
  • You can't, and that's on purpose. Otherwise anyone could embed any website and run arbitrary code, i.e. build the easiest phishing attempts ever seen. This can't be done and that's A Very Good Thing. – filipe Aug 27 '22 at 07:59

0 Answers0