Created
August 27, 2013 14:09
-
-
Save robertcasanova/6354026 to your computer and use it in GitHub Desktop.
Observer Pattern With Backbone: communication between objects.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var observer = {}; | |
_.extend(observer,Backbone.Events); | |
//use | |
observer.trigger("keyboard:pressed",obj); | |
observer.on("keyboard:pressed", function(obj) {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment