Skip to content

Instantly share code, notes, and snippets.

@pamelafox
Created April 13, 2012 19:08
Show Gist options
  • Save pamelafox/2379263 to your computer and use it in GitHub Desktop.
Save pamelafox/2379263 to your computer and use it in GitHub Desktop.
impl example
function MobilePage() {
this.initialized = false;
}
MobilePage.prototype.setup = function() {};
MobilePage.prototype.setupOnce = function() {
if (this.initialized !== true) this.setup();
this.initialized = true;
};
MobilePage.prototype.show = function() {};
var pages = {};
pages.splash = ED.util.impl(MobilePage, function() {
var DOM = {
navBar: '#nav-bar'
};
function show() {
if (checkLoginStatus()) {
showPage(pages.log);
} else {
showPage(pages.login);
}
}
return {
'id': 'splash',
'show': show
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment