- From: David Flanagan <dflanagan@mozilla.com>
- Date: Thu, 19 May 2011 16:28:25 -0700
- To: www-dom@w3.org
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=...]
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. I'd like to suggest that these four [NoNull]
annotations be replaced with prose that specify exactly what should
happen for null (or undefined) arguments. My best guess about the
appropriate behavior is throwing a DOMException with a code of
NOT_FOUND_ERR.
David Flanagan
Received on Friday, 20 May 2011 06:56:33 UTC