Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2021-12-16 14:24:16 +0300
committerXhmikosR <xhmikosr@gmail.com>2022-01-30 15:15:17 +0300
commitd09281705988690b63a5364548447c603cb557fd (patch)
tree31fc121c96ba85dce8f6a8cf8a25cf0f6fc0268b /js
parentfa939951232b7066722e928b370fd5e56b373fba (diff)
Event handler: merge `new Event` with `new CustomEvent`
Diffstat (limited to 'js')
-rw-r--r--js/src/dom/event-handler.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js
index f4305b6187..9ab1fe3c55 100644
--- a/js/src/dom/event-handler.js
+++ b/js/src/dom/event-handler.js
@@ -283,7 +283,6 @@ const EventHandler = {
const $ = getjQuery()
const typeEvent = getTypeEvent(event)
const inNamespace = event !== typeEvent
- const isNative = nativeEvents.has(typeEvent)
let jQueryEvent
let bubbles = true
@@ -299,9 +298,7 @@ const EventHandler = {
defaultPrevented = jQueryEvent.isDefaultPrevented()
}
- const evt = isNative ?
- new Event(event, { bubbles, cancelable: true }) :
- new CustomEvent(event, { bubbles, cancelable: true })
+ const evt = new Event(event, { bubbles, cancelable: true })
// merge custom information in our event
if (typeof args !== 'undefined') {