Martin Bialasinski wrote:
> On 12/10/06, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
> >
> > RobG a écrit :
>
> > Aside from my two notes above, your replacement seems fine.  Why don't
> > you create a tested patch for it and file in a Trac ticket with it?
>
> Usage of the elements collection of the Form element has already been
> rejected by Thomas in favor of the current implementation.
> Unfortunately, the reasoning in favor for the current implementation
> is not documented
>
> http://dev.rubyonrails.org/ticket/4249

Changing the elements nodeList to an Array means that the collection is
no longer live - whether that was intended is another unknown.  At
least your suggested method preserves that side-effect with the minimum
of fuss.

Anyone wanting a live nodeList is back to using the DOM elements
collection, or could use getElementsByTagName if that provides a
suitable subset.

I can't see any benefit in using getElement.  Not only is it very
inefficient, it also mangles the order of the elements in a way that
may not be consistent across browsers - the properties of an object
(such as when using for..in) do not have to be returned in any
particular order.  It has been an issue in the past where a particular
order was expected, but some browsers returned them in the order they
are added and others in some other order (say sorted alphabetically).


-- 
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