Timeline for How to find event listeners on a DOM node in JavaScript or in debugging?
Current License: CC BY-SA 4.0
18 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 10, 2021 at 23:03 | history | edited | Crescent Fresh | CC BY-SA 4.0 |
Previous edits to add jquery functionality were erroneously placed in the prototype section
|
| Sep 25, 2020 at 21:53 | history | edited | mbomb007 | CC BY-SA 4.0 |
added 39 characters in body
|
| Sep 25, 2020 at 21:46 | comment | added | mbomb007 | @MattBrowne Very nice. I added it to the answer as a complete solution. | |
| Sep 25, 2020 at 21:45 | history | edited | mbomb007 | CC BY-SA 4.0 |
Added jQuery 1.7+ method
|
| Feb 13, 2014 at 16:17 | comment | added | Matt Browne |
@tomdemuyt In jQuery, events are now stored in an internal data array rather than being accessible via .data('events') like they were before. To access the internal event data, use $._data(elem, 'events'). Note that this function is marked "for internal use only" in the jQuery source, so no promises that it will always work in the future, but I believe it's worked ever since jQuery 1.7 and still works.
|
|
| Jan 12, 2014 at 9:06 | comment | added | Rolf | Why are there so many ways of attaching events and so many places they can be saved? It's not really helping us programmers, is it? | |
| Jan 12, 2013 at 18:24 | comment | added | Aaron |
What about event listeners that aren't on the actual element like the following: $(parentElement).on(event, 'myElement', handler);?
|
|
| May 30, 2012 at 18:26 | comment | added | tomdemuyt | @Jan, this does not seem to work for jQuery 1.7.2, is there a different approach for that version ? | |
| Apr 25, 2012 at 17:23 | comment | added | John | If someone is sloppy they can create a monitoring service. If they have good practices they simply won't need to create one. Same listeners overwrite the old versions of themselves. | |
| Apr 25, 2012 at 1:23 | comment | added | Crescent Fresh |
@John: thanks for the comment. You have an example of "real JavaScript" to fetch listeners previously added via addEventListener?
|
|
| Oct 18, 2011 at 23:00 | comment | added | Nickolay | On "Method B" (addEventListener) here's an answer regarding the status of the enumeration facilities for handlers registered with pure DOM Events API: stackoverflow.com/questions/7810534/… | |
| Mar 4, 2010 at 15:50 | history | edited | Crescent Fresh | CC BY-SA 2.5 |
Update code change for jQuery 1.4
|
| Oct 31, 2009 at 8:22 | history | edited | Crescent Fresh | CC BY-SA 2.5 |
added 211 characters in body
|
| Sep 14, 2009 at 18:35 | comment | added | Keith Bentrup | Thx for updating this. It's unfortunate that you have to iterate thru each type of handler. | |
| Sep 14, 2009 at 18:14 | history | edited | Crescent Fresh | CC BY-SA 2.5 |
Update for prototype > 1.5
|
| Jan 15, 2009 at 17:01 | history | edited | Crescent Fresh | CC BY-SA 2.5 |
variable name clarification
|
| Jan 15, 2009 at 16:26 | vote | accept | Navneet | ||
| Aug 9, 2010 at 10:10 | |||||
| Jan 15, 2009 at 15:13 | history | answered | Crescent Fresh | CC BY-SA 2.5 |