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

[TreatNonCallableAsNull] alternative?

From: Marcos Caceres <w3c@marcosc.com>
Date: Thu, 16 Feb 2012 15:46:18 +0000
To: public-script-coord <public-script-coord@w3.org>
Message-ID: <BF2CB9DA86254DECBEB52E22355BBB6D@marcosc.com>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:05 UTC