Martin Bialasinski wrote:
> On 12/11/06, RobG <[EMAIL PROTECTED]> wrote:
> >
> > Martin Bialasinski wrote:
> > > Yes. Prototype never returns a NodeList but an (automatically
> > > Enumerable extended) Array.

Not always - check Form.Methods.getInputs:

  getInputs: function(form, typeName, name) {
    form = $(form);
    var inputs = form.getElementsByTagName('input');

    if (!typeName && !name)
      return inputs;
    ...

Seems to me that will return a NodeList/HTMLCollection, since that's
what getElementsByTagName returns.

  <URL: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-A6C9094 >

If you provide values for type or name (or both) you'll get an Array.


> > I'm rapidly coming to the conclusion that Prototype is not for me.
>
> This behaviour is what I need 100% of cases, so I works great for me.

You'd better submit a change then.


-- 
Rob


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to