[webidl] Callback confusion

Hi,

I'm confused with http://dev.w3.org/2006/webapi/WebIDL/#Callback

It seems that it is not possible to write:

t.addListener(function() { ... });

without throwing a typeError when the callback is thrown. Does that mean that you can never write an IDL
that will let you write foo(function() {...};) without errors, and that you can only write it as foo({ baz: function() {...}}); ?

Also, the code labeled /* 2 */ is not explained. Does that mean that that line does nothing?

Cheers,
Max.

Received on Wednesday, 29 April 2009 10:59:20 UTC