A
Asen Bozhilov
Dmitry said:3. It's portable.
-- Yeah, but I'm not sure that you will define all the (needed)
structure of the `window' including `window' inself. Moreover, I can't
imagine, what will you code do in *completely different* environment.
In *completely different* environment you'll use completely different
host objects. That's absolutely doesn't mean: "the code which works
identically in all host environments, the only thing to do - is
manually define needed objects in host environment". You code also
won't have sense in completely different host environment if there
will be `window' object and even will be `window.alert', but with
*completely different* meaning and behavior. So, this is also doubtful
argument.
From your 4 points i think this is only reasonable point. Here
implementation of concrete `window' object doesn't matter. I said it.
When i use window.alert that share me, easy to migrate in different
environment, without create properties of Global Object. For my, that
is better design and easy to port in different environment. ;~)
Regards and happy holidays.