diff options
Diffstat (limited to 'app/assets/javascripts/commons/polyfills/event.js')
-rw-r--r-- | app/assets/javascripts/commons/polyfills/event.js | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/app/assets/javascripts/commons/polyfills/event.js b/app/assets/javascripts/commons/polyfills/event.js deleted file mode 100644 index 543dd5f9a93..00000000000 --- a/app/assets/javascripts/commons/polyfills/event.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Polyfill: Event constructor - * @what new Event() - * @why To align browser support - * @browsers Internet Explorer 11 - * @see https://caniuse.com/#feat=mdn-api_event_event - * - * Although `initEvent` is deprecated for modern browsers it is the one supported by IE - */ -if (typeof window.Event !== 'function') { - window.Event = function Event(event, params) { - const evt = document.createEvent('Event'); - const evtParams = { - bubbles: false, - cancelable: false, - ...params, - }; - evt.initEvent(event, evtParams.bubbles, evtParams.cancelable); - return evt; - }; - window.Event.prototype = Event; -} |