W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2011

[DOMCore] [NoNull] annotation is not defined by WebIDL anymore

From: David Flanagan <dflanagan@mozilla.com>
Date: Thu, 19 May 2011 16:28:25 -0700
Message-ID: <4DD5A799.50801@mozilla.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:07 GMT