PDA

View Full Version : getChildrenByClassName



glauff
8 Nov 2006, 2:15 AM
Hello Jack,
I encountered a problem with the getChildrenByClassName Function.
The function returns an array with the length of 1, even if no children were found.

You do

cn[len];

but I think :

cn = new Array(len);

would be a better choice.

What do you think ?

jack.slocum
8 Nov 2006, 4:31 AM
Yep. That's a bug. I fixed in the dev code. Thanks for reporting it.

glauff
10 Nov 2006, 5:41 AM
Hi,

I just checked RC1.

YAHOO.ext.Element.getChildrenByTagName
has the same bug.

jack.slocum
10 Nov 2006, 6:46 AM
Since I just put it up a little bit ago I went ahead and uploaded a new zip correcting that function too. I should have checked.