You would have to implement window.postMessage functionality. In that manner a message can be sent from iFrame to parent window. When that is done (the event), make sure you add a listener to that event to get the data from the iFrame into your page content. See for instance:
I know this isn't an eloquent solution but I just cant think of an easier way to do that in Mendix. Hope this helps and I'm looking forward to other peoples suggestions!