The CustomEvent() constructor creates a new CustomEvent.
- Based on MDN Docs
npminstall--save-devjspolyfill-custom-eventrequire('jspolyfill-custom-event')();Note: Make sure to add the extra set of parenthesis at the end to fire the function that
registers the creation of the polyfill.
varevent=newCustomEvent(typeArg,customEventInit);Visit MDN for More information.