var A=function(){
};
$.extend(A.prototype, {
init:function(){
alert(\'A init\');
}
});
var B=function(){
};
$.extend(B.prototype,A.prototype,{
I use the same pattern and I like its conciseness.
About the lack of the "super" keyword, that's not really a problem. Thanks to Function.prototype.call() operator, you can call any function within the context of any object. So the sequence to call A.prototype.init() from B.prototype.init() is:
A.prototype.init.call(this, some parameters ...);
Also, don't forget that you may call A constructor from B constructor like this:
B = function(key, name) {
A.call(this, key);
this.name = name;
};
An experimented JS coder will know what happens.
So to conclude: not perfect but close enough.