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

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Thu, 18 Oct 2007 18:48:22 +1000
To: public-webapi@w3.org
Message-ID: <20071018084822.GB8388@arc.mcc.id.au>

Ian Hickson:
> Our conclusion was that we would like a way to mark an interface as 
> being a callback and thus implementable as a function, with the interface 
> having one method, that method defing the signature of the function. Such 
> interfaces should, in addition, not be exposed on the global object in JS.

Why would you want an interface object not exposed on the global object
for these callback interfaces?  Firefox at the moment does have an
EventListener interface object; Opera and WebKit don’t.

For HTML 5 peculiarities, perhaps an [InhibitInterfaceObject] or
something could be a more general solution.

> (I personally would like something even further, I'd love to just be able 
> to put the callback signature right in the method:
>    void callMeBack(in [Arguments=in long value, in bool active] Callback callback);
> ...or some such. That would get around having to actually define each of 
> these interfaces, which is becoming a right pain in the neck for me over 
> in the HTML5 spec. However, I don't think we need this in the Bindings 
> spec, I can just define a preprocessor step for this for myself.)

That seems to be more preprocessor-y to me.

Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au
Received on Thursday, 18 October 2007 08:48:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:24 UTC