W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2012

Re: [TreatNonCallableAsNull] alternative?

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 07 Mar 2012 16:56:22 +0100
To: "Cameron McCormack" <cam@mcc.id.au>
Cc: "Marcos Caceres" <w3c@marcosc.com>, public-script-coord@w3.org, "Boris Zbarsky" <bzbarsky@mit.edu>
Message-ID: <op.wasun0it64w2qv@annevk-macbookpro.local>
On Wed, 07 Mar 2012 00:50:22 +0100, Cameron McCormack <cam@mcc.id.au>  
> Consistency among event handler attributes?  That's my preference too.  
> But not Boris'.

He seems convinced now.

> Anyway, the strongest objection I have in this issue is against the use  
> of [TreatNonCallableAsNull] for things other than event handler  
> attributes.  My opinion on whether [TreatNonCallableAsNull] should be  
> used only for specific event handler attributes or for all of them is a  
> weak one.

The point I am making is that by having [TreatNonCallableAsNull] at all  
you introduce the possibility of it being used for other things. If  
instead you only defined the only thing for which it will ever be used,  
namely "[TreatNonCallableAsNull] attribute Function?" -> "eventhandler"  
you avoid that possibility. Given that you do not actually define event  
handler attributes I don't think it's a layering violation. It's just a  
special type of callback that happens to be extremely common in the  
platform of which the semantics of the members that use it are defined in  
HTML (or by reference to the event handler attribute concept in HTML).

Web IDL defines "eventhandler" as special callback. HTML defines "event  
handler attribute" (which has some other legacy baggage besides IDL  
syntax) so we can introduce "on..." members throughout the platform.

> I don't see what's so bad about the one-time typedef.  Typedefs exist to  
> avoid repetition like that!

The point is more that it would be the only place where  
[TreatNonCallableAsNull] would ever be used. That seems silly.

Anne van Kesteren
Received on Wednesday, 7 March 2012 15:57:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:05 UTC