Skip to content

Instantly share code, notes, and snippets.

@hay
Last active December 11, 2015 01:29
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 hay/4523765 to your computer and use it in GitHub Desktop.
Save hay/4523765 to your computer and use it in GitHub Desktop.
var Module = Stapes.subclass({
sayName : function() {
console.log('i say my name!');
}
});
var BetterModule = Module.subclass({
// Note that this method name is the same as the one in Module
sayName : function() {
BetterModule.parent.sayName.apply(this, arguments);
console.log('i say my name better');
}
});
var module = new BetterModule();
module.sayName(); // 'i say my name! i say my name better!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment