Which YUI Event Listener?

Posted by sh1mmer on Aug 28, 2007 in JavaScript |

The Accessibility toolbar for Firefox has a feature for developers that presents a list of the event handler attributes for each element on the page. The problem is that using attributes to set events is nasty and the YUI Event library instead attaches a singleton listener to the window which isn’t shown. This main YUI listener then delegates to YUI Event listeners which are created.

In order to get something like the functionality in the accessibility toolbar for YUI Event library listeners I’ve made a bookmarklet that uses some of the functionality of the YUI Event library. The YUI Event List Bookmarklet will show you a list of all the elements on the page that have listeners attached and what those listeners are. You can also view the functions that will be called when the event fires. It’s perfect for tracking down that elusive listener that’s using event propagation to hook onto stuff.

Technorati Tags:
, , , ,

Share with friends:
  • Twitter
  • HackerNews
  • del.icio.us
  • Reddit
  • Digg
  • StumbleUpon

blog comments powered by Disqus

Copyright © 2010 Kid666 Blog All rights reserved. Base theme by Laptop Geek.