Window Add Custom Event Listener Typescript