Pollyfill for CustomEvent