W3C home > Mailing lists > Public > public-webapi@w3.org > October 2007

Re: [Bindings] extended attribute for callback function interfaces?

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 17 Oct 2007 18:36:33 -0700
Message-ID: <4716B8A1.1080709@sicking.cc>
To: "L. David Baron" <dbaron@dbaron.org>, Web APIs WG <public-webapi@w3.org>

L. David Baron wrote:
> There are a number of interfaces, used as callbacks, like
> EventListener [1], NodeFilter [2], and UserDataHandler [3], and
> XPathNSEventResolver [4] where an interface has a single method and
> is intended to be implemented by the DOM user as a callback.  In
> ECMAScript bindings, the implementation typically accepts a raw
> function for such cases, in addition to (or rather than, in some
> implementations, perhaps?) an object with a named property for the
> function.
> 
> Should there be an extended attribute to indicate such interfaces?
> (I'd note that Mozilla's IDL has such an extended attribute,
> [function].)

Yes, I definitely think this is needed. Current specifications use 
English descriptions in the ECMAScript bindings to accomplish that 
behavior to be specified, it would be much more easily detected and 
precisely described if we could use an extended attribute for this.

/ Jonas
Received on Thursday, 18 October 2007 01:38:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:58 GMT