Polyfill Event constructor for Internet Explorer 11
Import the Event-constructor-polyfill.js JavaScript library wherever you want into the document before using it.
<script src="Event-constructor-polyfill.min.js"></script>
<script>
const event = new Event('build');
let elem = document.getElementById('my-element');
// Listen for the event.
elem.addEventListener('build', function(e) { /* ... */ }, false);
// Dispatch the event.
elem.dispatchEvent(event);
</script>
- Emanuel Rojas Vásquez - Initial work - erovas
This project is licensed under the MIT License - see the LICENSE file for details.