Last active
August 29, 2015 13:55
-
-
Save saumya/8755642 to your computer and use it in GitHub Desktop.
BackboneJS : Making an event dispatcher by extending Event
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
define('social/util', | |
['dependentLib'], | |
function(){ | |
var myUtilLib = _.extend({ | |
init: function(){ | |
this.trigger("myUtilLib:init", "init message"); | |
}, | |
destroy: function(){ | |
this.trigger("myUtilLib:destroy", "destroy message"); | |
} | |
},Backbone.Events); | |
return myUtilLib; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment