It depends on how you pass the event handler when registering the event.
Following code
element.addEventListener("click", myObject.EventHandler);
will not do what you want.
Javascript does not handle delegates, such as C #, so myObject.EventHandler is not an EventHandler method called for myObject.
If you want to call an object method as an event handler, it is best to include it in a function.
element.addEventListener("click", function(event) { myObject.EventHandler(event); });
source share