Skip to content

Commit

Permalink
event-handler: switch to const (#38362)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored Mar 28, 2023
1 parent 1fe9067 commit c953096
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/src/dom/event-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ const EventHandler = {
defaultPrevented = jQueryEvent.isDefaultPrevented()
}

let evt = new Event(event, { bubbles, cancelable: true })
evt = hydrateObj(evt, args)
const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args)

if (defaultPrevented) {
evt.preventDefault()
Expand Down

0 comments on commit c953096

Please sign in to comment.