Created
November 27, 2012 09:49
-
-
Save thanpolas/4153379 to your computer and use it in GitHub Desktop.
Google Closure events wiring
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
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