Skip to content Skip to sidebar Skip to footer

How To Pass The Event Object To A Named Function

I have an event handler for the click event. The event handler is a named function instead of an anonymous function. How can I pass the event object to this named function? // us

Solution 1:

Event is passed to the event handling function as an argument by default

function myHandler(evt) {
    // You can use event object here
}

Post a Comment for "How To Pass The Event Object To A Named Function"