'Ask element for their events

In JavaScript, is there a way to as a element for the events that I can use to add listener.

Something like:

element = document.getElementById(id);
console.log(element.listEvents);

I'm using a DOM example, but this would be useful in node.js also.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source