On Mar 26, 3:53 am, Steve Upton <[EMAIL PROTECTED]> wrote:
> At 12:04 AM +0100 3/25/08, Peter De Berdt wrote:
>
> >Just use $A(document.getElementsByClassName('foo')) instead of 
> >document.getElementsByClassName('foo') and you will have an array of 
> >extended elements, which is what you probably want. Simple workaround and 
> >haven't had any problems with it yet, both on Safari 3.1 and Firefox 3 beta 
> >(which also implements a native getElementsByClassName.
>
> This is a good thing to know but Safari 3.1's new implementation of 
> getElementsByClassName does not seem to use the parentElement parameter so I 
> get elements for the whole page... not what I needed.

Read the doco - it doesn't need to, it's implemented as per the HTML 5
working draft on the HTMLElement interface, it is called as a method
of the "parentElement":

  var liveNodeList = parentElement.getElementsByClassName('foo bar
tweedle dee ...');

<URL: http://www.w3.org/html/wg/html5/#getelementsbyclassname >


--
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 rubyonrails-spinoffs@googlegroups.com
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