On Aug 27, 2008, at 2:39 PM, Boris Zbarsky wrote:
Garrett Smith wrote:
Given that, I suggest moving forward:
Test, then document those methods as having special behavior. Do
this not by a null->value mapping, but by documenting the method's
algorithm in simple terms. e.g. "if X is not a string, throw an
error"
But giving a (per-method) mapping means that the algorithm can then
be machine-generated from the IDL, which is an interoperability win:
less chance of a mistake being made.
In fact, we already use such IDL annotations in WebKit and it has made
our DOM bindings more consistent, more interoperable, and less prone
to breaking through coding errors. I think it is a good model for the
spec to do the same.
- Maciej