ui5 framework extend function

113 阅读1分钟
  • extend is actually returning a new class by Metadata.createClass
  • create prototype chain
    fnClass.prototype = jQuery.sap.newObject(fnBaseClass.prototype);
    fnClass.prototype.constructor = fnClass;
  • Make the class visible as JS Object: jQuery.sap.setObject(sClassName, fnClass);
  • fnClass.getMetadata = fnClass.prototype.getMetadata = jQuery.sap.getter(oMetadata);











    要获取更多Jerry的原创文章,请关注公众号"汪子熙":