Added polyfills for EventTarget (needed for Safari) and CustomEvent (needed for IE)

This commit is contained in:
eugenijm 2020-01-23 23:53:48 +03:00
parent deb2ddb398
commit 2c61eb8e7f
4 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,9 @@
import EventTargetPolyfill from '@ungap/event-target'
try {
/* eslint-disable no-new */
new EventTarget()
/* eslint-enable no-new */
} catch (e) {
window.EventTarget = EventTargetPolyfill
}

View file

@ -2,6 +2,9 @@ import Vue from 'vue'
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import 'custom-event-polyfill'
import './lib/event_target_polyfill.js'
import interfaceModule from './modules/interface.js'
import instanceModule from './modules/instance.js'
import statusesModule from './modules/statuses.js'