In a normal browser javascript environment, you always have the global window object to fall back on but is there a default accessible global object for the Microsoft JScript Runtime or at least a way to check for one?
In a normal browser javascript environment, you always have the global window object to
Share
According to MSDN, there is a
Globalobject, however a quick test reveals that it is not directly accessible:What you can do, however, is take advantage of the fact that
thisin a global context refers to the global object and save the reference to a variable: