Get code of event listener present on DOM object on webkit browsers

In webkit based browsers, you can get informations about added event listener using getEventListeners(domObject).

var windowEventListeners = getEventListeners(window)
var errorListeners = windowEventListeners["error"]
var firstErrorListener = errorListener[0]
console.log('Error listener code : ',firstErrorListener["listener"].toString())
Written on March 14, 2018
Licence Creative Commons
Ce(tte) œuvre est mise à disposition selon les termes de la Licence Creative Commons Attribution 4.0 International.