On Thu, Mar 5, 2009 at 5:10 PM, Matt Mastracci <[email protected]> wrote:
> function x() {
> var a = 3;
> return new Function("alert(a); a = 4;");
> }
I hadn't thought of that! Unfortunately, the code in question has
definitions like "function foo() { ... } " that are intended to end
up defined at global scope.
Joel suggests that it would work to rearrange the code to look more
like "foo = function() { ...}" or even "window.foo = function() {
...}". I agree, but that means the compiler would need to be coaxed
into generating this alternate code. It ultimately needs to, anyway,
for supporting the cross-site linker, but I was hoping to avoid
getting into that right now.
Lex
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---