polyfill CustomEvent