W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2008

[whatwg] reply() extension to postMessage()

From: Aaron Boodman <aa@google.com>
Date: Thu, 14 Feb 2008 11:28:08 -0800
Message-ID: <278fd46c0802141128k2742ad36x803877c0cce0c5aa@mail.gmail.com>
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

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:39 UTC