[whatwg] reply() extension to postMessage()
Aaron Boodman
aa at google.com
Thu Feb 14 11:28:08 PST 2008
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
More information about the whatwg
mailing list