[OpenUI5] jQuery.sap.declare源码分析
jQuery.sap.declare用于宣称一个模块已存在。
在OpenUI5开发指南–精粹–优化应用–模块化和依赖管理中对declare介绍是:
Modules can declare themselves by calling the static jQuery.sap.declare functionwith their name. This helpsSAPUI5tocheck at runtime whether a loaded module contains the expectedcontent by comparing the required name against the declared name.As a side effect,jQuery.sap.declare ensures that the parent namespace of the module name exists in the currentglobal namespace (window).Formore information, see jQuery.sap.declare.
For modules without declaration, the framework assumes that themodule has the expected content and declares it with the name thatwas used for loading.