[whatwg] reply() extension to postMessage()

On Thu, Feb 14, 2008 at 10:46 AM, Ian Hickson <ian at hixie.ch> wrote:
>  ...except that the receiver could be extended to expect messages back:
>
>    // receiver
>    window.addEventListener("message", function(e) {
>      alert("got message: " + e.message);
>      e.endPoint.onmessage = function (e) {
>        alert("got a specific message: " + e.message);
>      };
>      e.endPoint.postMessage("good day");
>    });

Cool idea. I think it would be more intuitive if you didn't have to
create and send pipes explicitly and they were just the return value
from sendMessage(). However this prevents the type of mediation that
you describe in the top of your proposal.

- a

Received on Thursday, 14 February 2008 11:28:08 UTC