W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

[webidl] Callback confusion

From: Max Froumentin <maxfro@opera.com>
Date: Wed, 29 Apr 2009 12:58:39 +0200
To: public-webapps@w3.org
Message-ID: <m2k553u3og.fsf@pc214.sm.oslo.opera.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:31 GMT