1element.addEventListener("click", () => {
2 functionYouWantToCall(yourArguments);
3});
1const element = document.getElementById('xyz');
2element.addEventListener('click', function(){ yourFunction(arg1, arg2) });
1var someEventHander=function(event,param1,param2){
2 console.log(event,param1,param2);
3}
4//add listener
5document.getElementById("someid").addEventListener('click',someEventHander.bind(event,'param1','param2'), false);