[whatwg] reply() extension to postMessage()

Ian Hickson ian at hixie.ch
Sat Mar 1 20:09:08 PST 2008


On Sat, 1 Mar 2008, Jonas Sicking wrote:
> > 
> > I updated the proposal recently (in response to similar feedback from 
> > Adam or Collin) to say that when you pass an EndPoint through 
> > postMessage(), what happens is that a clone EndPoint is made for 
> > delivery on the other side, and the EndPoint you passed becomes 
> > invalid.
> 
> So why bother with having one side create two endpoints just to have one 
> made invalid? It intoroduces two more objects (the pair and the second 
> endpoint) that the caller basically will just throw away. Wouldn't it be 
> better to have one side instead create just one endpoint (though I would 
> call it a messagePipe instead) and then make the postMessage 
> implementation create the other endpoint.

Because then you could only pass an endpoint across a pipe once. The idea 
is to be able to send both ends across pipes many times.

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



More information about the whatwg mailing list