I suspect the postMessage would be dispatched in this case, but the eventdispatch would probably go to the document at http://a/ instead of http://b/.
This would fail as well because of the targetOrigin argument. (Unless that is * I guess, but can't you just check before invoking postMessage() anyway?)
-- Anne van Kesteren http://annevankesteren.nl/