Subj : Re: dereferenced object To : netscape.public.mozilla.jseng From : Brendan Eich Date : Sat Apr 17 2004 06:17 pm Thibaut wrote: > What do you mean ?? > > This is what you told me : > >>Use the JSClass.getProperty hook for childNodes' class. It should >>handle id parameters for which JSVAL_IS_INT(id) evaluates to true and >>JSVAL_TO_INT(id) is >= 0 and < the length of the array. > > > i know how to get a property , when i evaluate this in my application : > Node.chilNodes.item(0) > it works properly. but how can I implement this : Node.childNodes[0] > so that it does the same job ??? > i want to tell the js engine that when i apply [index] to chilNodes > (Node.childNodes[index] ) it has to call the function item(index) > (Node.childNodes.item(index) ) > > childNodes is not an array but an object with an arrayObject as property Yes, I know. I meant what I wrote: the childNodes object should have a JSClass whose getProperty handles non-negative int id gets by calling item(i), where i = JSVAL_TO_INT(id). /be .