I am trying to find an event listener I have attached to the document, but when I console.log it i get an error. I have tried to get do getElementById and getElementsByClassName, but i couldn't see the Event listener I attached to it. Here is a test code
document.addEventListener('keydown', test,false);
function test(e) {
console.log(document);
}
What i want to do is grab the event listener save it and re-added later on in another class. Something
var savedListener = document._listener;
document.removeAllEventListener();
and maybe in another class for example
document._listener = savedListener ;