About KJS::HTMLCollection::getNamedItems

Koos Vriezen koos.vriezen at xs4all.nl
Thu Aug 15 13:15:47 BST 2002


On Thu, 15 Aug 2002, David Faure wrote:

> But this doesn't answer the "is this behaviour for forms only, or for all nested elements".
> Did you try stuff like <div name='test'><div name='test'></div></div>, to
> see if your idea about identically-named nested elements is true?

Like I said, I did some small tests and it looks like you're right. If I
put the text box outside the form or in another form, document.myname
always comes with the myname form.
Didn't test other nested elements. Will have to wait till monday for that
(don't have IE at home).

> I think this is really only for forms. The fix would be to add a new value to the ReturnType enum
> in KJS::HTMLCollection, named "ReturnForm" (i.e. only return form elements),
> and add support for it in HTMLCollection, and use that value in kjs_html.cpp:169
> if element.elementId() == ID_FORM.

That would be great. Could you also do something about the default value
of this collection in case there are multible elements? (Harri doesn't
like my idea. Damn, just made a patch for it.)

Thanks,

Koos





More information about the kfm-devel mailing list