Subj : Rhino: new Function under sealed Global To : netscape.public.mozilla.jseng From : Mike C. Date : Thu Jun 30 2005 11:22 am Hi, I have a script executing inside a unsealed scope which is inside a sealed Global. The statement var func = new Function("arg", "return 'foo(' + arg + ')'") print(func('bar')) gives an error "Cannot add a property to a sealed object: anonymous" However an eval will work under the same scope: function callFunc(arg) { return eval("'foo(' + arg + ')'"); } print(callFunc('bar')); Is there a way to make the runtime accept the "new Function" statement the same way it accepts the eval? Thanks, Mike .