Re: [WebIDL] Callback, PropertyOnly, NoInterfaceObject

On Jun 30, 2009, at 8:12 PM, Cameron McCormack wrote:

> Hi Steffen, Giovanni.
>
> Giovanni Campagna:
>> [Callback], despite the names, does not mean that the interface will
>> be called back by a method accepting it (although that was the  
>> initial
>> use case). It barely means that you can convert an Object (in the
>> ECMAScript sense) to an object in the WebIDL sense, of that  
>> interface.
>
> I agree with everything Giovanni said.
>
> Regarding the name of the extended attribute: it used to be called
> [NativeObject], but there were restrictions on it so that it could  
> only
> be used on interfaces with operations (and not attributes).  Ian then
> requested it be renamed to [Callback], since that was more  
> descriptive.
> Since that restriction has now been lifted, and [Callback] interfaces
> can have attributes, I agree that [Callback] isn’t the most obvious  
> name
> any more.
>
> Anybody object to renaming it back to [NativeObject] then (or can
> suggest a better name)?

The name NativeObject seems nondescriptive and could easily be taken  
as the opposite of what it means. For example, in the browser context,  
code written in C++ is often called "native" but code written in  
JavaScript typically is not. But "NativeObject" would be applied to  
interfaces that are expected to be implemented in JavaScript, perhaps  
even just by specifying a function directly.

I'm not sure if there is a better word than "Callback" to connote an  
interface that is expected to be implemented by clients of the API  
rather than implementation of the API. Maybe "ClientInterface" or  
"ClientObject".

Regards,
Maciej

Received on Wednesday, 1 July 2009 04:11:14 UTC