Subj : How to: Limit package visibility to js scripts To : netscape.public.mozilla.jseng From : "Mark Turansky" Date : Tue Nov 25 2003 11:21 am Is it possible to limit how much java a javascript can script? Unless I can limit package access to a script, I don't see much use for extending ScriptableObject. For example, the ubiquitous User class.... //this fails! var user = new com.mycompany.User() //doesn't know what 'com' is... //this works! var user = java.lang.Class.forName("com.mycompany.User").newInstance(); ------------------------ so, if I didn't want script writers to access the User object directly, I could extend ScriptableObject and make JSUser into a wrapper of User while limiting the methods exposed. But if the script writer can access the class directly, what is the point? Can I cut-off what the script can do? Can I turn off ALL java classes and only have the Context use the classes I feed it? thanks! mark p.s. the new mozilla site looks great. kudos to whomever put that up online. .