diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-10-26 17:09:07 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-11-05 16:37:34 +0300 |
commit | e8f1709adfd79bd8a9dd1e99b240edd39fd91d11 (patch) | |
tree | aba9be3fd639078ef818e63eccc730d1036171e8 /js/src | |
parent | 0766a096055a4f34c795e77f0e5c024310d20ef4 (diff) |
Drop Legacy Edge support.
This allows us to move forward without being held back. Microsoft already replaces the Legacy Edge with the new one on supported Windows versions.
Diffstat (limited to 'js/src')
-rw-r--r-- | js/src/dom/event-handler.js | 7 | ||||
-rw-r--r-- | js/src/dom/polyfill.js | 17 |
2 files changed, 1 insertions, 23 deletions
diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js index 1d109c57ec..c228e21ba1 100644 --- a/js/src/dom/event-handler.js +++ b/js/src/dom/event-handler.js @@ -6,7 +6,6 @@ */ import { getjQuery } from '../util/index' -import { defaultPreventedPreservedOnDispatch } from './polyfill' /** * ------------------------------------------------------------------------ @@ -314,12 +313,6 @@ const EventHandler = { if (defaultPrevented) { evt.preventDefault() - - if (!defaultPreventedPreservedOnDispatch) { - Object.defineProperty(evt, 'defaultPrevented', { - get: () => true - }) - } } if (nativeDispatch) { diff --git a/js/src/dom/polyfill.js b/js/src/dom/polyfill.js index ed982587b6..c5318a1300 100644 --- a/js/src/dom/polyfill.js +++ b/js/src/dom/polyfill.js @@ -10,20 +10,6 @@ import { getUID } from '../util/index' let find = Element.prototype.querySelectorAll let findOne = Element.prototype.querySelector -// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached -const defaultPreventedPreservedOnDispatch = (() => { - const e = new CustomEvent('Bootstrap', { - cancelable: true - }) - - const element = document.createElement('div') - element.addEventListener('Bootstrap', () => null) - - e.preventDefault() - element.dispatchEvent(e) - return e.defaultPrevented -})() - const scopeSelectorRegex = /:scope\b/ const supportsScopeQuery = (() => { const element = document.createElement('div') @@ -75,6 +61,5 @@ if (!supportsScopeQuery) { export { find, - findOne, - defaultPreventedPreservedOnDispatch + findOne } |