1
我试图注入的JavaScript文档的页面后,加载磁头:CefSharp JavaScript注入
var browserSettings = new BrowserSettings();
browserSettings.FileAccessFromFileUrlsAllowed = true;
browserSettings.UniversalAccessFromFileUrlsAllowed = true;
browserSettings.TextAreaResizeDisabled = true;
var webView= new WebView("about:blank", browserSettings);
webView.EvaluateScript("var script = document.createElement('script')"); // Line 1
webView.EvaluateScript("script.src='http://domain.my/scripts/my.js'"); // Line 2
webView.EvaluateScript("document.body.appendChild(script)"); // Line 3
evaluting脚本行后1和2,我可以在开发工具看到脚本变量。但是,当我尝试执行行3我收到异常:
An unhandled exception of type 'System.StackOverflowException' occurred in CefSharp.dll
哪里是我的错?