'How To Get Current Listener- Function(callback) of Element

I want to get existing function, setted in element as listener. Is it possible?

for example:

button.onclick = function() { console.log("clicked") } // setted by another library

console.log(button.someMethod()) // function() { console.log('clicked') }


Sources

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

Source: Stack Overflow

Solution Source