This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Event handler IDL attributes either take a Function object or null. However, the behavior in user agents is such that whenever you assign a non-Function null is assumed (e.g. "test", 2, []). Maybe this can be combined with [AllowAny] somehow? Not sure if that is worth it though.
Which user agents behave this way? I suspect Gecko does, but I'd be interested to know what others do.
All of them, basically. See http://www.w3.org/Bugs/Public/show_bug.cgi?id=13433 (which should probably have been referenced in comment 0) for details.
addEventListener()'s EventListener also seems affected by this. Have not tested other callbacks, but did notice that the timeout API already accepts "any".
> addEventListener()'s EventListener also seems affected by this. Only in some browsers.
It wasn't clear to me reading through bug 13433 and this one again whether we want to treat as null (a) non-callable objects, (b) non-Function objects or (c) non-objects. I've assumed (a) for now and added [TreatNonCallableAsNull]. http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.html.diff?r1=1.355;r2=1.356;f=h Let me know if that works or needs changes.