<html>
<script>
function Aggregation(name) {
this.mAggregationName = name;
}
var oItemAgg = new Aggregation("item");
debugger;
Aggregation.prototype.generate = function(add, prototype) {
add("getAggregation", prototype, function() {
console.log(" getAggregation should be implemented here!");
});
}
function add(name, proto, fn){
if ( !proto[name] ) {
proto[name] = fn;
}
}
oItemAgg.generate(add, Aggregation.prototype);
oItemAgg.getAggregation();
debugger;
var Sub = function(name) {
Aggregation.call(this, name);
};
Sub.prototype = new Aggregation();
var subAggregation = new Sub("Sub");
debugger;
</script>