[whatwg] reply() extension to postMessage()

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.   `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 1 March 2008 20:09:08 UTC