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

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