[TreatNonCallableAsNull] alternative?

The WebIDL spec warns against using [TreatNonCallableAsNull] "unless required to specify the behavior of legacy APIs", but does not provide guidance on what to do in a situation where an Editor might need such a thing (apart from emailing this list); Can you please add some more text to the warning saying what the alternative is (e.g., using prose or to avoid defining "obj.onwhatever" event handler attributes… )?   



In a spec I'm working on, I had hoped to use something like:

Interface SomeThing : EventTarget{
[TreatNonCallableAsNull] attribute SomeCallBack? onclose;
}



So I could have both:

window.something.onclose = function(){ ... }
window.something.addEventListener("close"….)


--  
Marcos Caceres
http://datadriven.com.au

Received on Thursday, 16 February 2012 15:46:52 UTC