Can I get a list of registered listeners/observers on an element?

What I'm trying to do is dynamically replace an element with another 
element, but want to preserve the events.

I don't want to resort to something like:

new_element.onclick = old_element.onclick;

as the prototype docs advise against using .onclick, .onmouseover etc.

If prototype doesn't provide a way to do this, is there a bare JS way to 
do it (ie to get a list of events that were registered with 
addEventListener)? I googled but couldn't find this.


- Kev

Kevin Porter
Advanced Web Construction Ltd

AJAX Blackjack - real-time multi-player blackjack game with no flash, java or 
software downloads required - http://blackjack.webutils.co.uk

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to