i cant call super class’s render
Super = Backbone.View.extend({
render : function(){
//super class code here (unable to call)
return this;
}
});
Sub = Super.extend({
render : function(){
//sub class code here (called)
return this;
}
});
var view = new Sub();
view.render();
i want to call sub class render first and then super class render.
in some case, super class render first and then sub class render.
so, is it possible to code subclass render which
call super class render before or after as per user requirement, without changing Super class
and without changing name of function.
So, what am i missing?
thanks, in advance.
I may be missing something here, but you can call the render method on the prototype of Super in your
Sub.renderfunction :And a Fiddle http://jsfiddle.net/WATqe/