Skip to content

Instantly share code, notes, and snippets.

@thanpolas
Created November 27, 2012 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thanpolas/4153379 to your computer and use it in GitHub Desktop.
Save thanpolas/4153379 to your computer and use it in GitHub Desktop.
Google Closure events wiring
myApp.Event = function(){};
goog.inherits(myApp.Event, goog.events.Event);
// --- in another file --- //
myApp.ClassOne = function(){
goog.base(this);
var eventObj = {
valueId: id,
type: myApp.ClassOne.EventType.INSTANCIATED // is this the path of the enum?
};
this.dispatchEvent(eventObj);
};
goog.inherits(myApp.ClassOne, goog.events.EventTarget);
// --- in yet another file --- //
/**
* Triggers on class instanciation
*
* @param {goog.events.Event} e <-- ???
* @private
*/
my.app.GoodView.prototype._onInstanciation = function(e) {
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment