Does Google Chrome MonitorEvent support custom events?

Simple question. I would like to track every time a custom event ("connect") is fired.

How can I view events triggered by an item in Chrome DevTools? and http://www.briangrinstead.com/blog/chrome-developer-tools-monitorevents i can use MonitorEvent to track events in chrome. However, I'm not sure if this supports custom events?

For example, I have a custom jQuery related event using $(document).bind('connect', function (ev, data) {//code here;});

but if I type monitorEvents($0, 'connect') into the console

I don't see any monitored events, even though the event is most accurately triggered in my code.

Thank!

FROM

+3


source to share


1 answer


monitorEvents is not part of the jQuery library, so it will not capture custom events ... it is part of the console object and therefore only "sees" the proper browser events. I recommend you take a look at how jQuery custom events work and create your own log, at least with jQuery, just set up an event listener in the document.



0


source







All Articles