There has been some debate on the WHATWG mailing list about switching
postMessage from synchronously posting an event in the target window, to
doing so asynchronously.
The main reason we're doing this is to in the future allow separate tabs
and windows run in separate threads. If postMessage is synchronous you
run the risk that two windows post a message to each other
simultaneously. This would cause the two windows to deadlock waiting for
each other to process the posted message.
In other words, we have forced web developers to deal with threading
issues and race conditions, something that I don't think we can expect
the majority of them to get right.
So to avoid preventing ourselves to in the future do more threading it
has been proposed that postMessage will fire the event asynchronously in
the other window. This has been discussed on the whatwg mailing list,
and there is a patch in bug 430251.
However since we are making this change so close to release, we want to
make sure that we are making the right decision, rather than a hasty
one, which is why I am posting here. So please, if you have any
feedback, raise as soon as possible.
Best Regards,
Jonas Sicking