Brian Di Palma (2013-07-13T09:18:39.000Z)
domenic at domenicdenicola.com (2013-07-16T14:27:11.605Z)
I didn't suggest that strings as event type would block anyone, strings work fine. I asked for some consideration to be given to also being able to use a unique object as the type key. I gave some reasons, copied below. > So in a modern IDE you could click on MY_EVENTS.PERMISSION_UPDATE and it would display the object which could contain the arguments the callback is provided with and a place to document the event. It might also improve minifying/refactoring and searching for occurrences of the event much easier then if it where a simple string. None of which are critical but could be handy when dealing with larger code bases and your event is simply called "click". I'm not too wedded to the idea, but I can imagine that if you are building applications with hundreds of packages and modules it might be a safer/easier way to identify instances of your specific event listeners.