balderdashy / mast

UI conventions built on top of Backbone.JS
MIT License
81 stars 14 forks source link

Simpler access to inherited method when overriding #73

Closed mikermcneil closed 11 years ago

mikermcneil commented 12 years ago
Mast.registerComponent('Dad',{
  init: function (){
     // Do some stuff
  }
});

Mast.registerComponent('Daughter',{
  extendsFrom: 'Dad',

  init: function() {
     // Run Dad's init function 
     // instead of Mast.components.Dad.prototype.init.call(this,someArg, someOtherArg);
     this.inherited.init(someArg,someOtherArg)

     // Do some more stuff specific to Daughter
  }
});