I'm trying to find the line of JavaScript that attached an event to a node. Chrome's inspector shows me several entries under 'click' in Event Listeners, but each of these just points to the same line in _createResponder in prototype.js. I'd like to know where these events were attached, and what code runs when they fire. Is there any way to find this out?
Asked
Active
Viewed 515 times
3
-
2Perhaps something like firebug or venkman could attach a breakpoint to the _createResponder call, which would give you a backtrace of where the attach call came from. but I don't think there's anyway to doing it after the fact. – Marc B Feb 25 '11 at 20:44
-
2I guess that using Chrome developers tools you can set breakpoints for the 'click' event or the line in _createResponder. When the event fires, using the debugger you can advance where the real function is executed and identify the code. Remember that you can use 'anyFunction.toString()' to 'see' the function's code, if the debugger doesn't take you to the 'real function'. – Sergio Cinos Feb 25 '11 at 22:09
-
1See my answer on a newer question http://stackoverflow.com/a/17978728/341491 regarding PrototypeJS Event Registry – Geek Num 88 Sep 19 '13 at 05:46