Is there any posibility to exchange the special global window scope by a custom one? I just thought with is meant to, but it only stacks another “lookup” scope. Eg.
test={};
with(test){
a=1;
}
does not create the property test.a but window.a.
So the window object has a JS-specific special quality I cannot recreate with own code?
With
withonly if the object passed in has that property, will it be modified. It will not be created.http://www.yuiblog.com/blog/2006/04/11/with-statement-considered-harmful/