Hi AndersBillLinden,
The global object is provided by the underlying script engine, and ClearScript does not allow you to replace it.
However, ClearScript lets you expose a host object so that its members appear within the global namespace:
Good luck!
The global object is provided by the underlying script engine, and ClearScript does not allow you to replace it.
However, ClearScript lets you expose a host object so that its members appear within the global namespace:
engine.AddHostObject("window", HostItemFlags.GlobalMembers, new Window()); engine.Execute("alert('hello')");