0

I have an iFrame inside an html. The iFrame contains a link of a certain application. Now, the application inside the iFrame needs to do some synchronous and asynchronous operation that (these operations) are hosted in the HTML (and not in the iFrame). For the communication between the iFrame and the HTML I'm using Window.postMessage(). My question is - Since 'Window.postMessage()' is asynchronous, how can I send a synchronous messages between the iFrame and the HTML? Assume that the application code will not change, is there alternative way to synchronous messages from the application (that in inside the iFrame) to the HTML?

  • Does both html(parent) and iframe belong to same domain? –  Sep 20 '18 at 16:31
  • Hi, no, they are on a different domain – user2591009 Sep 20 '18 at 16:32
  • https://stackoverflow.com/questions/3076414/ways-to-circumvent-the-same-origin-policy – Teemu Sep 20 '18 at 16:53
  • Possible duplicate of [Can I do synchronous cross-domain communicating with window.postMessage?](https://stackoverflow.com/questions/9062682/can-i-do-synchronous-cross-domain-communicating-with-window-postmessage) – Daniel Beck Sep 20 '18 at 18:09

0 Answers0