How is Aggregation designed

<html>
<script>

function Aggregation(name) {
this.mAggregationName = name;
}

var oItemAgg = new Aggregation("item"); // so far, Aggregation oject has no available method

debugger;

Aggregation.prototype.generate = function(add, prototype) {
var that = this, n = that.mAggregationName;

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;
</script>

How is Aggregation designed

How is Aggregation designed


上一篇:logon dialog 的弹出逻辑debug出来了,有很多有用的代码片段


下一篇:UI5按钮渲染原理