Hi David.
David Flanagan:
> The current DOM Core draft uses the [NoNull] annotation for
> insertBefore(), replaceChild(), removeChild() and appendChild().
> But [NoNull] is no longer defined by WebIDL, apparently replaced by
> [TreatNullAs=...]
My plan is to resolve
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10640 by making interface
types by default not include null, and to require a nullable type if you
do want to allow null. Thus you’d have
Node appendChild(in Node n);
because you don’t want to allow null to be passed in, and
readonly attribute Node? parentNode;
because that attribute can be null.
> More generally, both the DOM and WebIDL are vague about how null
> arguments are to be handled, and as near as I can tell, this is left
> up to the implementation.
My current thinking is to make this case throw a TypeError.
[TreatNullAs] is just for handling DOMStrings, btw.
--
Cameron McCormack ≝ http://mcc.id.au/