W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2005

[whatwg] ECMAScript extensions in Web Applications

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 16 Oct 2005 00:55:43 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0510160054340.23945@dhalsim.dreamhost.com>
On Sat, 15 Oct 2005, L. David Baron wrote:
>
> That said, if that is what it's trying to say, it's rather poorly 
> worded, since it refers to the binding where I think it shouldn't.
> 
> The ability to use a function (often anonymous) instead of having to 
> construct an object for a single-method interface is quite useful.
> 
> I'm not sure whether there's value in having the reverse feature in the 
> binding, i.e., saying that objects from outside the ECMAScript world 
> reflected into it that implement the one-method EventListener interface 
> act like functions.  I don't know if current browsers do this.

Well, the EventTarget interfaces are defined as taking EventListeners. So 
from another language, if it isn't null, you can call .handleEvent() on 
them. I don't see how else to define it. Suggestions are very welcome 
though. How would you improve it?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 15 October 2005 17:55:43 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:43 UTC