W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: DOM collections index out of bounds and JavaScript.

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 19 Oct 2010 10:27:28 +0200
To: "Erik Arvidsson" <arv@chromium.org>, "Cameron McCormack" <cam@mcc.id.au>
Cc: public-webapps@w3.org
Message-ID: <op.vktdr2ri64w2qv@anne-van-kesterens-macbook-pro.local>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:41 GMT