[whatwg] Request: window.postMessage should be async

Aaron Boodman aa at google.com
Fri Apr 4 15:03:58 PDT 2008

On Fri, Apr 4, 2008 at 2:39 PM, Anne van Kesteren <annevk at opera.com> wrote:
>  It doesn't make sense to change this given that all synthesized event
> dispatching is synchronous. I don't think postMessage() should be different.

It seems a little different to me. PostMesasge events are fired in
another frame that the caller can't even see into. What difference
does it make to the caller whether postMessage is synchronous or not?

Furthermore, if we're going to add the ability for the conversation to
go back and forth, to me it gets strange.

If you call postMessage() on a frame, and it returns the favor, you
receive the reply before your call to postMessage() even returns. To
me, the current shape of the API (and even the name 'post message')
implies that this is an asynchronous system and that postMessage()
returns immediately, queuing a message to be delivered to the other

- a

More information about the whatwg mailing list