:: Forum >>

function to create namespace

Alex,

Would you consider adding a function similar to this to the framwork:

function createNamespace(namespace)
{
if( typeof(namespace) == "undefined" )
return;

var domains = namespace.split(".");
var domain = window;
for( i=0; i<domains.length; i++ )
{
var subdomain = domains[i];
if( !domain[subdomain] )
domain[subdomain] = {};

domain = domain[subdomain];
}
}

it'd be handy to have it ubiquitously, especially for posting/sharing custom control code.

Dmitry
Thursday, January 26, 2006

This topic is archived.


Back to support forum

Forum search