var Model = function(){
this.parent_func = function(){
console.log("model parent() called");
};
};
Model.prototype.api = new function(){
var self = this;
self.create = function(){
console.log("api::create() -", arguments);
return self;
};
self.update = function(){
console.log("api::update() -", arguments);
return self;
};
self.parent_call = function(){
console.log("api::parent_call() -", arguments);
self.__proto__.parent_func(); // <- TypeError: self.__proto__.parent_func is not a function
return self;
};
return self;
};
var model = new Model();
model.api.create();
model.api.update();
model.api.parent_call();
model.parent_func();