This project has moved. For the latest updates, please go here.

How to change the Global Object to another object?

Jan 15, 2014 at 1:59 PM
Just like in Chrome,the Global object is "window".the code:
var i=100;
if(window.i==100) //this is true
Jan 15, 2014 at 2:35 PM
Edited Jan 15, 2014 at 4:25 PM

You can't replace the global object, but you can easily set up an alias that will satisfy the above code:
engine.Execute("window = this");
Please let us know if that doesn't work for you.