Re: DOM collections index out of bounds and JavaScript.

On Tue, 19 Oct 2010 03:11:25 +0200, Cameron McCormack <cam@mcc.id.au>  
wrote:
> Does it particularly matter that collection.item(999) returns null while
> collection['999'] evaluates to undefined?  To me, it makes sense enough.
> Functions and properties that returns Nodes, and which have no Node to
> return, return null.  I think for consistency with all of these other
> funtions and properties, it is preferable to return null from
> collection.item().  That’s a much bigger (better) consistency to strive
> for than one between collection.item(999) and collection['999'], IMO.

It is certainly my goal to make CSSOM (and anything else I edit)  
consistent with this if that was the (indirect) question (not sure why  
else I would be on the cc list). I just have not familiarized myself yet  
with the particulars of Web IDL in this area (and have not been working on  
CSSOM for a while).


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Tuesday, 19 October 2010 08:28:30 UTC