diff options
Diffstat (limited to 'app/assets/javascripts/commons/polyfills/custom_event.js')
-rw-r--r-- | app/assets/javascripts/commons/polyfills/custom_event.js | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/app/assets/javascripts/commons/polyfills/custom_event.js b/app/assets/javascripts/commons/polyfills/custom_event.js deleted file mode 100644 index 6b14eff6f05..00000000000 --- a/app/assets/javascripts/commons/polyfills/custom_event.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Polyfill: CustomEvent constructor - * @what new CustomEvent() - * @why Certain features, e.g. notes utilize this - * @browsers Internet Explorer 11 - * @see https://caniuse.com/#feat=customevent - */ -if (typeof window.CustomEvent !== 'function') { - window.CustomEvent = function CustomEvent(event, params) { - const evt = document.createEvent('CustomEvent'); - const evtParams = { - bubbles: false, - cancelable: false, - detail: undefined, - ...params, - }; - evt.initCustomEvent(event, evtParams.bubbles, evtParams.cancelable, evtParams.detail); - return evt; - }; - window.CustomEvent.prototype = Event; -} |