In my previous post, I mentioned github hosting a version of the EventDispatcher which had extended functionality for adding scope when dispatching and listening to events. The interface is the same but the method signitures are different. In This post we’ll be exploring how to add Object scope to the EventDispatcher. more…
22-06-2009
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. more…