ページが読み込まれた後、ドキュメントの先頭に 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
スクリプト行 1 と 2 を評価した後、開発ツールでスクリプト変数を確認できます。しかし、3 行目を実行しようとすると、例外が発生します。
An unhandled exception of type 'System.StackOverflowException' occurred in CefSharp.dll
私の間違いはどこですか?