Hi Steve,
Thanks for the comments.
My opinion is to avoid using global vars which may spoil the namespace as well as introducing restrictions (such as some only work for HTML).
For the lib way, seen in the doc, there can be a "general way" of implementing the "lib funcs" with JS. Instead of using a global method, this may be a good way (as said it works for all envs):
In the myLib.js (which should be uploaded)
var libUtils={
libMethod1: function(p){ /*body: general-use function*/ },
libMethod2: function(p){ /*body*/}
};
return libUtils;
So in Personas JS code:
var myUtil=session.utils.include("id-of-libUtils", true);
var myResult=myUtil.libMethod1(myParam);
As said this will work for all platforms. Then it is really a matter to add some "matured" lib functions that can be used by many people.
What do you feel about this?
Br,
DOng Zhu