Added polyfills for EventTarget (needed for Safari) and CustomEvent (needed for IE)
This commit is contained in:
parent
deb2ddb398
commit
2c61eb8e7f
4 changed files with 24 additions and 0 deletions
9
src/lib/event_target_polyfill.js
Normal file
9
src/lib/event_target_polyfill.js
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue