Skip to content

Stop wasting your time looking for where those handlers are registered, use findHandlersJS and discover them instantly

License

Notifications You must be signed in to change notification settings

ruidfigueiredo/findHandlersJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

findHandlersJS

Stop wasting your time looking for where those handlers are registered, use findHandlersJS and discover them instantly.

Usage: findEventHandlers(eventType, jQuerySelector)

Imagine you want to find all the "click" event handlers for all the buttons that are immediate children of the div with id="myDiv":

findEventHandlers("click", "div#myDiv > :button")

It will return an array with the element names, the jQuery $._data event information and the list of elements that that event handler covers (targets).

For example, if div#myDiv has a delegate handler with the selector :button and there is a button with id="save" inside the div, you would get this result: [{ element: div#myDiv, events: [{ type: "click", handler: function() {...}, namespace: "", selector: ":button", ... targets: [button#save] }] }]

If you are using the console on Chrome, you can right click the handler, click show function definition and add breakpoints to debug the handlers.

More info here

About

Stop wasting your time looking for where those handlers are registered, use findHandlersJS and discover them instantly

Resources

License

Stars

Watchers

Forks

Packages

No packages published