node package manager


spy on events

Event Spy

WIP event spy. Useful for debugging purposes. Must be initialized at the top of your script.

spy('click', function(e, fn) {
  console.log('caught', e.type,;
  // pass through, e);
$ component install matthewmueller/event-spy

Spy on events. type can either be a string or a regex. If no type given, spy watches all events.

  • mouseover and mousedown events:
spy(/(mouseover|mousedown)/, fn);
  • All events:

Removes the spy

  • fix removeEventListener()
  • tests