title: window.addEventListener on a message emitted from an iframe
body: <p>I have two html files. The first is called <code>post.html</code> and it registers an event listener on the window and posts a message to the window:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script&gt;
              window.addEventListener("message", function(event) {
                  console.log("found event in post!", event)
              }); 
              window.postMessage({
                 'data': ["some data"]
              },"*");   
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have a second html file called <code>listner.html</code> that just listens for a message from the window and loads <code>post.html</code> as an iframe:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script&gt;
              window.addEventListener("message", function(event) {
                console.log("event found in listen!", event)
              }); 
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;iframe src="post.html"&gt;&lt;/iframe&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>If I load <code>listener.html</code>, I get the log indicating that the event listener in <code>post.html</code> detected the message posted to the window in <code>post.html</code> but I don't get any log from <code>listener.html</code>. My understanding was that I should be able to communicate via the <code>window</code> object between the two files and the event listener in <code>listener.html</code> should receive the event. Any idea why this isn't working?</p>