[commits-cosmo] (travis) [3152] Removed inline js includes from pim.jsp and retrofitted all of our code to use dojo.require.

Matthew Eernisse mde at osafoundation.org
Tue Dec 19 14:52:40 PST 2006

As long as all these old global vars are now namespaced, and the 
namespace is itself initially declared with a proper 'var' declaration, 
I can't see there being any problems.

According to the docs, 'var' is supposed to be optional ("Using var 
outside a function is optional; you can declare a variable by simply 
assigning it a value."), but I have seen cases (I believe in IE) where 
things break when the interpreter encounters variables that have not 
been previously declared.

Please make sure we're not using any undeclared variables, if possible.



svncheckin at osafoundation.org wrote:
> "global variables" defined with var are not put into the global 
> namespace. The fix was to remove
> the var statement.
> * To make this a little nicer, whenever I removed a "var", I put the 
> defined object in a * proper namespace and included an assignment of the 
> form "{oldVarName} = {namespace}.{oldVarName}*

More information about the Commits-Cosmo mailing list