implemented custom event polyfill for ie