How is SAP UI5 Aggregation designed
生活随笔
收集整理的這篇文章主要介紹了
How is SAP UI5 Aggregation designed
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
我的sample code: 最后是framework debug
<html> <script>function Aggregation(name) { this.mAggregationName = name; }var oItemAgg = new Aggregation("item"); // so far, Aggregation oject has no available methoddebugger;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>這里的bindItem實際上不是一個function,而是Javascript對象的一個attribute,該attribute指向了一個匿名函數(shù),其實現(xiàn)是 this.bindAggregation(n, o, t, s,f)
要獲取更多Jerry的原創(chuàng)文章,請關注公眾號"汪子熙":
總結
以上是生活随笔為你收集整理的How is SAP UI5 Aggregation designed的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: React的source code in
- 下一篇: 奇瑞小蚂蚁 Q 电动小车亮相:外观内饰换