xul-ext javascript should use stronger scoping mechanisms to protect private data
Currently, any other xul extension can access the innards of the monkeysphere xul extension, since the global object @monkeysphere@ is just declared flatly at top-level name scope.
we should do more clever things to limit the exposure of internal MS data.
For example, instead of
var monkeysphere = { foo: blah, bar: x, //... };
we might prefer
var monkeysphere = (function() { var bar = x; //... return { foo: blah, //... } })();
as a way to protect the @bar@ variable from outside use.
it would also let us refer to plain ol' @bar@ within the other code, instead of having to write @monkeysphere.bar@.
(from redmine: created on 2010-03-11, closed on 2010-03-11)