This question has been asked... but I've never seen a solid answer... maybe
I just missed them. But if you're using version 1.6.1_rc3 (or any version
with Element#getStorage() )



                var _storage    = $('element').getStorage();
                console.log(
_storage._object.prototype_event_registry._object );



(assumes you have firebug (or anything that supports a console.log() )
running.)



On Tue, Aug 25, 2009 at 5:45 PM, Kevin Porter <[email protected]> wrote:

>
>
> Hi,
>
> 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.
>
>
> regards,
>
> - Kev
>
> --
> Kevin Porter
> Advanced Web Construction Ltd
> http://webutils.co.uk
> http://billiardsearch.net
> http://9ballpool.co.uk
>
> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to