In this document, we are:
message
event listener and handler.message
event is fired, we will use our event handler to invoke window.postMessage()
(and using setTimeout
to delay the message posting).In the document of our new window, we are:
message
event listener and handler to listen for message events posted from this document.