I opened the Developer Tools in Google Chrome, pasted the following code in console and pressed Enter:
document.removeEventListener(`keypress`, a1);
document.addEventListener(`keypress`, a1);
function a1(event){
console.log(`I should have been called only once`);
}
Then I pressed some key...