Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gecko 45 c#winform将脚本添加到文档_C#_Gecko - Fatal编程技术网

Gecko 45 c#winform将脚本添加到文档

Gecko 45 c#winform将脚本添加到文档,c#,gecko,C#,Gecko,我使用void时出错。请帮帮我 string output; using (AutoJSContext jsContext = new AutoJSContext(wb.Window.JSContext)) { jsContext.EvaluateScript(jsStr, out output); } Geckofx-Core.dll中发生类型为“System.InvalidOperationException”的未处理异常 其他信息:JSContext不在cx上存储默认的隔间

我使用void时出错。请帮帮我

string output;
using (AutoJSContext jsContext = new AutoJSContext(wb.Window.JSContext))
{
       jsContext.EvaluateScript(jsStr, out output);
}
Geckofx-Core.dll中发生类型为“System.InvalidOperationException”的未处理异常

其他信息:JSContext不在cx上存储默认的隔间对象


自Gecko 45以来,我使用另一个
EvaluateScript
重载使其工作:

  string output;
  using (AutoJSContext context = new AutoJSContext(wb.Window))
  {
     context.EvaluateScript(jsStr, (nsISupports) wb.Window.DomWindow, out output);

  }