window.postMessage not working from iframe to parent document : <p>I'm trying to send a simple message from a child document (an iframe) back to its direct parent using the window.postMessage API.</p>

<p>Within the parent document I have the following:</p>

<pre><code>window.addEventListener("message", receiveMessage, true);
var receiveMessage = function(event) {
    console.log("Recieved event " + JSON.stringify(event));
}
</code></pre>

<p>Then, in the iframe I have the following:</p>

<pre><code>window.parent.postMessage('message', '*');
</code></pre>

<p>Based on everything I've read, this should work and my log message should be written to the console.  Except it's not working.</p>

<p>I'm aware that using the * as the targetOrigin is not always secure, but at this point I just want to sort out the linkage.</p>

<p>Any ideas or anything obvious that I'm missing?</p>
