Skip to content

Instantly share code, notes, and snippets.

@benvanik
Created July 19, 2013 21:26
Show Gist options
  • Save benvanik/6042467 to your computer and use it in GitHub Desktop.
Save benvanik/6042467 to your computer and use it in GitHub Desktop.
my.Base = function(drawEventType) {
if (TRACING_ENABLED) {
this.drawEventType_ = drawEventType;
}
};
my.Base.prototype.draw = function() {
var scope = TRACING_ENABLED ? this.drawEventType_() : null;
...
leaveScope(scope);
};
my.Subclass = function() {
goog.base(my.Subclass.DRAW_EVENT_TYPE);
};
my.Subclass.DRAW_EVENT_TYPE = createScopeEvent('my.Subclass#draw');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment