At first, we need to register the message event to the listener on the parent:
Note: You can limit the source of the message for security by asking the event for its origin (e.origin).
Now we need to post the message, the height of its content, by the iframe:
Thats it. Thats all.