IECustomEvent = function CustomEvent(type, params) {
  const e = document.createEvent('CustomEvent');

  if (params) {
    e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
  } else {
    e.initCustomEvent(type, false, false, undefined);
  }

  return e;
}
Lousy polyfill for the Custom Event constructor for IE.
@param {!string} type The type of the event.
@param {?Object} params Additional information for the event.
@return {Event}
@constructor