Re: connection ceremony for iframe postMessage communications

On Thu, 9 Feb 2012, John J Barton wrote:
> 
> However the solution has two significant problems:
>   1. There is no way to know if portToOtherWindow is connected before
> you issue postMessage()

Just have the target message you when it's ready.


>   2. All iframes send messages to the same "handler".

Pass a MessagePort to the target when you start a new conversation, and 
do the rest of the conversation on that.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 10 February 2012 00:43:01 UTC