src/js/utils/custom-event.js
function canIuseNativeCustom() {
  try {
    const p = new NativeCustomEvent('t', {
      detail: {
        a: 'b'
      }
    });
    return 't' === p.type && 'b' === p.detail.a;
  } catch (e) { }

  /* istanbul ignore next: hard to reproduce on test environment  */
  return false;
}
function canIuseNativeCustom() {
  try {
    const p = new NativeCustomEvent('t', {
      detail: {
        a: 'b'
      }
    });
    return 't' === p.type && 'b' === p.detail.a;
  } catch (e) { }

  /* istanbul ignore next: hard to reproduce on test environment  */
  return false;
}
function canIuseNativeCustom ( ) { try { const p = new NativeCustomEvent ( 't' , { detail : { a : 'b' } } ) ; return 't' === p . type && 'b' === p . detail . a ; } catch ( e ) { } /* istanbul ignore next: hard to reproduce on test environment  */ return false ; }
Check for the usage of native support for CustomEvents which is lacking
completely on IE.
@return {boolean} Whether it can be used or not.
Check for the usage of native support for CustomEvents which is lacking completely on IE .