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>

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?

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:12:53 UTC