I've defined an event like this:
var event = new Event('myevent');
Is there anyway which i can check an event called 'myevent' has been defined ?
I want to have an option like this:
If an event called 'myevent' exists, attach a handler to it, else attach the handler to another event like 'myevent2' !
myeventlike thisif (event && event.type == 'myevent') ....