On javascript events

One thing that always get on my nerves with Javascript is that it was a pain (until today for me) to get from an HTML element to the actual javascript that runs once you hover, click, etc that element.

I’m a visual kind of guy so my rationale was:

  • I see a button on a webpage that does something that smells like javascripty
  • I open firebug and select that element
  • I expect to have some kind of panel/hint about the events that are registered for that element without success :S

Today, tired of it, I start looking for a solution, and I found an amazing one, let me introduce you visual events 2!

It’s a bookmark that you place on your browser and if you click on it the page gets blue rectangular overlays on all elements that have a javascript event handler!

But not only that, if you hover over one of those boxes you will see what I was expecting from the beginning: the code that is executed and where it lies (which file and line).


Una resposta a “On javascript events”

  1. Actually Chrome allows you to put a breakpoint on an HTML event, just by visually choosing the DOM element and checking the event you want it to break on.

Deixa un comentari

L'adreça electrònica no es publicarà Els camps necessaris estan marcats amb *

Podeu fer servir aquestes etiquetes i atributs HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>