I use this check in a jasmine spec to ensure a newly created element has attached events. The element is supposed to have events attached to keydown and blur, and altough right now I'm not exactly testing that, at least I could test that the element had attached events. If there are better ways to test that, I'd love to know.
Will take a look at VisualEvents soon, maybe that'll be useful in my test environment. Thanks! -- :: dip -- On Thu, Aug 16, 2012 at 7:05 AM, Victor <vkhomyac...@gmail.com> wrote: >> In prototype 1.6.0.1 I used to use Event.cache[formElement._eventID] to >> check if an element has attached events. > > > Why do you need such check at all? If you need to remove all event observers > from element - there is #stopObserving(), if you need to remove from element > and its children - there is #purge(). > > Look at > https://github.com/victor-homyakov/VisualEvent/blob/master/js/parsers/prototype1.7.js > - this code enumerates attached event handlers. > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/prototype-scriptaculous/-/tBFOZrZJ_gAJ. > > To post to this group, send email to > prototype-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.