User:Gerbrant/gui/toolbox.js: Difference between revisions

Content deleted Content added
Gerbrant (talk | contribs)
try to make it possible to use classes as well as objects
Gerbrant (talk | contribs)
oops, naming conflict (you'd think a var li in an inner function would declare a new variable, but it apparently still refers to the variable in the outer function)
Line 34:
try
{
var i, l = Gerbrant.gui.toolbox.load, lix, n;
for(i in l)
if((n = (lix = l[i])[0]) == undefined)
loadModule(lix, this.addObject);
else
loadModule(n, function(c)
{
var o = {};
c.apply(o, lix.slice(1));
this.addObject(o);
});