W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

[WebIDL] Trying to understand IndexGetter/NameGetter

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 30 Sep 2009 10:32:04 -0400
Message-ID: <4AC36BE4.2030804@mit.edu>
To: public-webapps <public-webapps@w3.org>
In section 4.4.2 of WebIDL, there is the following language:

   As soon as a name N begins being able to be used to index
   the host object, a property called the corresponding named
   property  MUST be created on the host object...

IndexGetter has similar verbiage.  I'm really not clear on this "begins 
being able to be used" thing.  Is that something the interface needs to 
define?

In particular, consider using IndexGetter for NodeList.  At what point 
can "10000" be used to index the nodelist?  Is it as soon as the 
nodelist is created?  Once the length is > 10000?  Something else?

In particular, the interaction with existing properties interests me. 
If I set document.links[5] while the document has 3 links and then I add 
3 more links, what is the value of document.links[5]?  What if I had 6 
links to start with?

-Boris
Received on Wednesday, 30 September 2009 14:32:39 GMT

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