Makes CustomEvent polyfill check for a function called CustomEvent