Recieving messages is the same in both. So you should treat this as an entirely separate window, wait for it to load, then add your listeners. The main difference between the two pages is the method of sending messages. If it then loads, your listener will be gone. For example, the "click" event belongs to the MouseEvent object. The type of the event object depends on the specified event. useCapture: Optional. Parent. When the event occurs, an event object is passed to the function as the first parameter. JavaScript. A simpler problem might be that the document inside the iframe has not loaded yet when you add the event listener. The load event is fired when the whole page has loaded, including all dependent resources such as stylesheets and images. The first parameter is the type of the event (like "click" or "mousedown" or any other HTML DOM Event. )The second parameter is the function we want to call when the event occurs. The iframe.onload event (on the