EventDispatching with JavaScript

I’ve been working with some really awesome Classes in my JavaScript toolbox lately, the EventDispatcher is one of them. So I thought I’d take the time to share this little gem with you.

Some of you may wonder how JavaScript can raise or listen to events. A few techniques are out there at the moment which do a great job, the style in which they are written vary but all use a similar mechanism to achieve the desired effect. This is good because it means we can have a layer that can sit independently from the DOM level and communicate through a notification (event) system. Continue reading