org.wings.js.wings.modules.namespace.js Maven / Gradle / Ivy
The newest version!
/***************************************************************************************************
* WINGS.NAMESPACE -- contains: global namespace object and related functions
**************************************************************************************************/
/**
* Create global namespace object
*/
if (typeof wingS == "undefined") {
var wingS = {};
}
/**
* Returns the namespace specified and creates it if it doesn't exist. For example both,
* 'wingS.namespace("property.package");' and 'wingS.namespace("wingS.property.package");'
* would create wingS.property, then wingS.property.package --> (@see YAHOO.namespace()).
* @param {String} arguments - 1 to n namespaces to create (separated with '.')
* @return {Object} reference to the last namespace object created
*/
wingS.namespace = function() {
var a=arguments, o=null, i, j, d;
for (i=0; i