I am writing a vanilla JavaScript tool, that when enabled adds event listeners to each of the elements passed into it.
I would like to do something
To 'addEventListener' with some parameters, you can use the following code:
addEventListener
{ myButton.addEventListener("click",myFunction.bind(null,event,myParameter1,myParameter2)); }
And the function 'myFunction' should be something like this:
myFunction
{ function myFunction(event, para1, para2){...} }