Wait for message from iframe before adding event listeners