Hey Colin!
Colin Mollenhour a écrit :
> I personally never use $$ because when I tried it, it was noticeably
> slower than other methods. My solution to grabbing elements from a
> large DOM was to override document.getElementsByClassName with a
> function that adds an extra parameter, tagName. This allows it to
> filter elements by tagName before applying any other filter rather
> than grabbing EVERY element in the DOM.
I think there's some patch in trac that goes the same way, but I'm not sure.
> I have no idea why the original override in prototype doesn't do
> this, that getElementsByTagName('*') just stuck out to me like a sore
> thumb as a prime candidate for an easy improvement.
I'd be interested to get an answer on this from Sam (although he doesn't
seem like he's very present in the community) or Thomas (more likely).
--
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---