Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Global window object

$
0
0
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:
engine.AddHostObject("window", HostItemFlags.GlobalMembers, new Window());
engine.Execute("alert('hello')");
Good luck!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images