I tried "for k,v in pairs(_G) do print("->", k,v) end" (I was curious what is and isn't sandboxed) and it just gave me an error.
It's all client-side.
An occasional feature of other languages-in-Javascript is some kind of sandboxing for security - eg the Valija Javascript subset that runs in the Caja sandbox (which in turn is implemented in Javascript): http://code.google.com/p/google-caja/wiki/SubsetRelationship...