Last active
August 30, 2022 18:59
-
-
Save cooljith91112/642516d7e3d801d532406822677f0106 to your computer and use it in GitHub Desktop.
Angular 4 IE11 Polyfills
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let event; | |
if (document.createEvent) { | |
// IE11 - dispatch event doesn't support Event | |
event = document.createEvent('Event'); | |
event.initEvent('input', true, true); | |
} else { | |
// Chrome | |
event = new Event('input'); | |
} | |
this.el.nativeElement.dispatchEvent(event); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment