I am using the following code to add an event listener on a DOM element:
var me = this;
element.addEventListener('click', function(element) {
return function(evt) {
me.handler(evt, element);
};
} (element) , false);
When I click the element, the handler is called with the event and the element as parameters.
I have read through the information about closures here, but I'm still not clear how the event object gets associated with the evt variable.