Skip to content

Instantly share code, notes, and snippets.

@lukehedger
Created June 24, 2014 11:46
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 lukehedger/176edc49186637935b2d to your computer and use it in GitHub Desktop.
Save lukehedger/176edc49186637935b2d to your computer and use it in GitHub Desktop.
Skeleton object-orientated JS
var app = new App('arg');
App = function(arg) {
this.APP_CONSTANT = 0;
this.appVar = arg;
this._init();
}
App.prototype._init = function(arg1) {
console.log(this.appVar);
this._addListeners();
}
App.prototype._addListeners = function() {
el.addEventListener("click", this._eventHandler);
}
@lukehedger
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment