This is more a guess than a real answer, but I will try to help, so please do not reduce if this is wrong. But according to the documentation (I have never worked with Javascript.net) the following is valid:
// Initialize the context JavascriptContext context = new JavascriptContext(); // Setting the externals parameters of the context context.SetParameter("console", new SystemConsole()); context.SetParameter("message", "Hello World !"); context.SetParameter("number", 1); // Running the script context.Run("var i; for (i = 0; i < 5; i++) console.Print(message + ' (' + i + ')'); number += i;"); // Getting a parameter Console.WriteLine("number: " + context.GetParameter("number"));
Perhaps you should set the window as a parameter for the ala this context:
context.SetParameter("window", new YourWindow());
And insure the window in which you provide have the same attributes / methods / etc. like a standard browser window.
Adding You can try and implement a simple window that simply writes to the console whenever a function is called on it. If not the reason, Javascript.Net gives you a window wrapper (although it doesn't look like it)
source share