Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Monitoring custom events in chrome?

I'm trying to figure out where an event is firing from, and I'm having zero luck.

So we have this:

this.model.on('change:inventory', this.inventory_callback, this);

And I set a breakpoint there and tried this in the chrome dev tools console:

monitorEvents(this.model)

But I got nothing. Tips? Advice? What am I doing wrong? Can I do it this way? If not, is there another way?

like image 485
temporary_user_name Avatar asked Oct 12 '25 11:10

temporary_user_name


1 Answers

monitorEvents() is intended for tracking native DOM events only. According to the tip-of-tree source (source code link), this is the comprehensive list of monitor-able event types (read "event names prefixed by"):

  • "mouse"
  • "key"
  • "touch"
  • "control"
  • "load"
  • "unload"
  • "abort"
  • "error"
  • "select"
  • "change"
  • "submit"
  • "reset"
  • "focus"
  • "blur"
  • "resize"
  • "scroll"
  • "search"
  • "devicemotion"
  • "deviceorientation"
like image 71
Alexander Pavlov Avatar answered Oct 15 '25 03:10

Alexander Pavlov