Good day!
Given the following code:
function text(a) { alert(a); }
Let's say I need to pass parameters to the function that will handle the event, for this I use an anonymous function wrapper.
Code:el.addEventListener('click', function() { text('it\\'s finnaly working!'); });
The question arises, how do I then remove event listener from this item if the two anonymous functions are different functions and this notation doesn't work:
Code:
el.removeEventListener('click', function() { text('it\\'s finnaly working!'); });