In Prototype 1.60 rc0, the code no longer overwrite the native method
getElementsByClassName, but the native method returns a nodeList
instead of Array object. And the nodeList is dynamically recreated,
and the Array is statically linked, so this difference may cause some
bugs, so I suggest a small wrapper for getElementsByClassName in
firefox3.0
code:
document.getElementsByClassName=function(temp){return function(a)
{return $A(temp.call(document,a))}}(document.getElementsByClassName)
quite simple, just use closure to keep the reference to the native
method, I know this overwrite the native method, but in the case all
other browsers has no support for getElementsByClassName and the
nodeList may cause some bugs, maybe this is a way to do the thing. Any
ideas?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to