zertosh / jquery-audit

jQuery Audit
MIT License
563 stars 26 forks source link

jQuery Audit

Install it from the Chrome Web Store.

jQuery Audit is a Chrome Developer Tools extension for debugging auditing jQuery — it creates a sidebar in the Elements panel containing jQuery delegated events, internal data, and more, as live DOM nodes, functions, and objects.

jQuery Audit panel

Live DOM nodes, functions, and objects

show function definition

Direct access to the document and window objects

document & window

Requirements: jQuery Audit does a typeof window.jQuery === 'function' whenever a node is selected. If it can't find a jQuery function in the global scope, the sidebar will display Error: "@(window.jQuery is missing)".

Tip: Text wrapped in @(...) are "messages" from jQuery Audit. This was the compromise made to get live objects in the sidebar and be able to show informative messages.


Sidebar sections

@(this element)
Data
Events([number_of_events])
Internal Data
dataset
own HTML

Finding bound handlers

Often event handlers are bound functions. In these cases, the function under Eventsevent_namehandler is the binder function and not the bindee. Depending on the binder used, the bindee function is usually near by.

_.bind from Lo-Dash
_.bind from Underscore and native Function.prototype.bind
$.proxy from jQuery

FAQ

Disclaimer: I am not related to the jQuery project.