【问题标题】:Gecko 45 c# winform add script to documentGecko 45 c# winform 添加脚本到文档
【发布时间】:2016-01-25 13:33:24
【问题描述】:

当我使用 void 时出现错误。请帮帮我

string output;
using (AutoJSContext jsContext = new AutoJSContext(wb.Window.JSContext))
{
       jsContext.EvaluateScript(jsStr, out output);
}

Geckofx-Core.dll 中出现“System.InvalidOperationException”类型的未处理异常

附加信息:JSContext 不会在 cx 上存储其默认的隔间对象。

【问题讨论】:

    标签: c# gecko


    【解决方案1】:

    从 Gecko 45 开始,我使用另一个 EvaluateScript 重载使其工作:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-27
      • 1970-01-01
      • 1970-01-01
      • 2014-02-06
      • 2012-05-17
      • 2012-06-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多