Re: ElementTraversal support in Firefox 3.1

Sam Weinig wrote:
> 
> 
> On Aug 19, 2008, at 3:08 PM, Jonas Sicking wrote:
> 
>>
>> Hi all,
>>
>> I just landed support for ElementTraversal in firefox. This will be 
>> available in tomorrow nightlies, as well as the upcoming Firefox 3.1 
>> Alpha 2 release that should be out soon.
>>
>> On top of this we also implement a 'children' property which is an 
>> NodeList of all child elements to allow children to be reached by 
>> index, such as
>>
>> res = myElement.children[5];
>>
>> The reason we chose the name 'children' for this property is that this 
>> is already available in IE, Safari and Opera (which makes me wonder 
>> about the arguments about this being too complex to implement).
> 
> In WebKit, we have the 'children' property implemented only on 
> HTMLElements and instead of returning a NodeList, it returns a 
> HTMLCollection (which differs only slightly from NodeList's interface).

In mozilla many NodeLists also implement HTMLCollection. This is 
somewhat unfortunate in some cases, such as this one, so we might fix 
that in the next release.

/ Jonas

Received on Wednesday, 20 August 2008 14:10:32 UTC