You can use something like this:
element.addEventListener ( 'click', (function ( myParam ) {
return function () {
};
} ) ( yourParam ), false );
everything that you pass, since "your pairs" will be available to the event handler using the "myParam" parameter ...
source
share