1var someEventHander=function(){
2 console.log(event,param1,param2);
3}
4//add listener
5document.getElementById("someid").addEventListener('click',someEventHander.bind(event,param1,param2));
1someObj.addEventListener('click', some_function(someVar) );
2
3const some_function = (someVar) => {
4 return (e) => {
5 console.log(someVar)
6 console.log(e)
7 }
8}
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);